chore: use standard library's HTTP status codes

This commit is contained in:
Eneko Illarramendi
2020-05-03 15:57:05 +02:00
parent 3a1167c892
commit 083f7a0a8d
18 changed files with 145 additions and 163 deletions
-15
View File
@@ -46,20 +46,5 @@ class ExtensionManager:
return output
class Status:
OK = 200
CREATED = 201
NO_CONTENT = 204
BAD_REQUEST = 400
UNAUTHORIZED = 401
PAYMENT_REQUIRED = 402
FORBIDDEN = 403
NOT_FOUND = 404
METHOD_NOT_ALLOWED = 405
UPGRADE_REQUIRED = 426
TOO_MANY_REQUESTS = 429
INTERNAL_SERVER_ERROR = 500
def urlsafe_short_hash() -> str:
return shortuuid.uuid()