aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/decorators.py (follow)
Commit message (Collapse)AuthorAgeLines
* LintingGravatar Gareth Coles2018-05-08-1/+1
|
* Move bot API key to a constantGravatar Gareth Coles2018-05-08-3/+2
|
* Declaring the encoding to be utf-8 is not necessary in Python3 projects, as ↵Gravatar Leon Sandøy2018-04-27-1/+0
| | | | this is the default encoding. Encoding declarations are only useful in py3 if you want to declare it to be something _other_ than utf-8. This was, however, a very useful convention in py2. (#56)
* Easier debugging and optimised importsGravatar Gareth Coles2018-04-08-3/+8
| | | | Simply set FLASK_DEBUG=1 in your env to skip OAuth checks
* More work towards the wikiGravatar Gareth Coles2018-04-05-1/+1
|
* LintingGravatar Gareth Coles2018-04-01-1/+1
|
* Add CSRF protection and optimise importsGravatar Gareth Coles2018-04-01-3/+18
|
* Role requirement decorator should return json on an API errorGravatar Gareth Coles2018-04-01-0/+3
|
* I'm assuming this is the last linting commit for now...Gravatar Gareth Coles2018-03-30-1/+1
|
* Decorator for routes that require a login with one of a set of rolesGravatar Gareth Coles2018-03-30-4/+24
|
* Change to PyCharm importsGravatar Gareth Coles2018-03-30-0/+1
|
* Make flake8 happierGravatar Gareth Coles2018-03-29-1/+1
|
* API for tags (#34)Gravatar Leon Sandøy2018-03-06-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Fixes for the API validation decoratorGravatar Gareth Coles2018-03-04-6/+10
|
* Add error messages (#30)Gravatar Joseph2018-02-28-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add error messages Signed-off-by: JoeBanks13 <[email protected]> * Remove un-used keyword arg from 404 * Assert for status code instead of full content * PEP8 * test lint * please coverage * oh * Exclude websockets.py from coverage * Move code output into terminal * Switch typewriter href protocol * Add tests for websockets.py * Abort previous commit, coveralls did not let coverage go down * Add more pauses and request => response * move css and js out, add typewriter JS to our own repo & add method for appending text in bulk. * Enable REPL on 4XX and change error descriptions * commas * /error path
* brings coverage to 90% (#24)Gravatar Christopher Baklid2018-02-26-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * brings coverage to 75% * satisfy flake8 * missing docstring added * one more test * artificially inflate coverage because python acts strange * testing decorators * fixed instantiation of test route * straggling newlines from debugging code * remove debug comments * restructure tests into logical class separations. more exlusions. more tests * testing websocket echo tests * added missing comment * convert single quotes to double quotes to satisfy docstrings
* API_KEY -> BOT_API_KEYGravatar Gareth Coles2018-02-16-1/+1
|
* API schema validation decorator #yzuf (#15)Gravatar Gareth Coles2018-02-16-4/+71
| | | | | | | | | | * API schema validation decorator * Remove stray comma * Remove unnecessary conditional * Only cast to list when needed to
* Fix up API key validation and database api locationGravatar Gareth Coles2018-02-15-1/+3
|
* Move API validation decorator to its own file #yxdkGravatar Gareth Coles2018-02-15-0/+21