[aur-dev] [PATCH v2 2/3] aurjson.class.php: Add method load_comment

Lukas Fleischer lfleischer at archlinux.org
Tue Jul 21 19:09:25 UTC 2015

On Tue, 21 Jul 2015 at 20:57:33, Marcel Korpel wrote:
> * Lukas Fleischer <lfleischer at archlinux.org> (Tue, 21 Jul 2015 18:25:18
> +0200):
> > We can directly return here when adding early returns for the error
> > cases. I wonder whether it is a good idea to provide different data
> > types, depending on whether an error occurred or not.
> I don't think so, but at least this isn't a public API.
> > Would it make sense to use json_results() and json_error() here?
> In all cases, you mean, error or not?

Yeah, in all cases.

> Could be, but suggest() and suggest_pkgbase() also don't make use of
> them and they aren't public APIs either, but directly used by AJAX
> requests on the site.

Agreed. I had the idea of potentially making it part of the public API
but it probably isn't too useful -- especially since it provides a whole
comment edit form instead of the plain comment only.

More information about the aur-dev mailing list