From 5d685b27c5454e29809fe6039e0cf8945cbbb52f Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 6 Mar 2018 20:05:44 +0100 Subject: API for tags (#34) * Help page and misc improvements Committing so I can go home >:| * [WIP] - API improvements for the tag features. Not completed. * renaming tag.py to tags.py and refactoring the nomenclature of docs to tags * fixed error message in tags, cleaning up app_test.py * tests for the tags feature * ignoring jsonify returns cause coverall can't handle them * Catch-all error view for the API blueprint * cleaning up APIErrorView a little * bringing coverage for tags.py to 100% * how did this get in here? * how did this get in here? ROUND 2 * Removing the 503 database error handling. It's not in use and we should probably rethink that whole custom error handling system anyway. * Converting the tags file to use the @api_params decorator instead of validating manually. Tested with bot staging. --- pysite/decorators.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pysite/decorators.py') diff --git a/pysite/decorators.py b/pysite/decorators.py index 952c2349..d8bf1381 100644 --- a/pysite/decorators.py +++ b/pysite/decorators.py @@ -48,6 +48,7 @@ def api_params(schema: Schema, validation_type: ValidationTypes = ValidationType if not isinstance(data, list): data = [data] + except JSONDecodeError: return self.error(ErrorCodes.bad_data_format) # pragma: no cover -- cgit v1.2.3