Commit Graph

15 Commits

Author SHA1 Message Date
Matt Prahl
4f629fe64c Use view type better suited for a REST API
MethodView maps to REST APIs intuitively, the method names on the class
are the same as the handled HTTP methods (just lowercase).
2016-09-22 13:26:31 +02:00
Matt Prahl
5aef7fed98 Fix whitespace, indentation 2016-09-22 13:26:11 +02:00
Matt Prahl
ec8126c226 Fix/cleanup Python 3 compatibility 2016-09-22 12:48:51 +02:00
Jan Kaluza
e236e86fce Prefix API calls with version number (for example '/1/'). Add initial support for multiple versions of API calls. 2016-09-21 15:58:15 +02:00
Ralph Bean
b12bda2d55 Check FAS for packager status, not pkgdb.
Before this, we were consulting pkgdb to see if the given user was the
maintainer of any packages.

That mostly works... but technically, we want to consult FAS to see if
the user is in the packager group.

We found this when @mprahl was unable to submit builds to rida.  I added
him to the packager group, but nothing changed!  (As written, he had to
actually own a package).

This change fixes all that so that we query FAS instead of pkgdb.

Tests are added.
2016-09-07 16:35:25 -04:00
Matt Prahl
fbe1beee54 Convert errors to JSON
Signed-off-by: Matt Prahl <mprahl@redhat.com>
Signed-off-by: Nils Philippsen <nils@redhat.com>
2016-08-26 12:06:28 +02:00
Matt Prahl
361de94693 Add filtering to the module-builds route 2016-08-24 15:20:20 +02:00
Matt Prahl
c79139b82c Add additional info to the module-build(s) API output 2016-08-24 15:20:20 +02:00
Matt Prahl
d1a01e5d79 Add owner and timestamp columns to the module_builds table 2016-08-24 15:20:20 +02:00
Nils Philippsen
1cd21434fb catch exceptions when removing temporary directory
Additionally, don't try to remove it when it wasn't created in the first
place.
2016-08-24 15:20:20 +02:00
Matt Prahl
1386d3506c Modify formatting for readability
Also, remove misleading comment.
2016-08-24 15:20:20 +02:00
Matt Prahl
961f22f0b4 Add pagination and verbose flag to the /rida/module-builds/ route
Adds details about the API changes
2016-08-15 17:54:40 +02:00
Ralph Bean
7a8e9e2232 flask.jsonify() doesn't like bare lists. 2016-08-10 15:01:40 -04:00
Ralph Bean
ef97401131 Cannot concatenate ints and strings. 2016-08-10 14:49:12 -04:00
Matt Prahl
7a928c3e8c Adds database migration support, converts rida.conf to config.py, adds Vagrant support, seperates out app views to views.py, control of the app now manage.py 2016-08-01 13:22:01 -04:00