API & Client - update API error messages to remove i18n workarounds

This commit is contained in:
Sam
2021-11-01 09:44:10 +01:00
parent fb6491638c
commit 7f6f33a6aa
36 changed files with 357 additions and 340 deletions

View File

@@ -147,9 +147,9 @@ def get_sports(auth_user_id: int) -> Dict:
:statuscode 200: success
:statuscode 401:
- Provide a valid auth token.
- Signature expired. Please log in again.
- Invalid token. Please log in again.
- provide a valid auth token
- signature expired, please log in again
- invalid token, please log in again
"""
user = User.query.filter_by(id=int(auth_user_id)).first()
@@ -239,9 +239,9 @@ def get_sport(auth_user_id: int, sport_id: int) -> Union[Dict, HttpResponse]:
:statuscode 200: success
:statuscode 401:
- Provide a valid auth token.
- Signature expired. Please log in again.
- Invalid token. Please log in again.
- provide a valid auth token
- signature expired, please log in again
- invalid token, please log in again
:statuscode 404: sport not found
"""
@@ -319,10 +319,10 @@ def update_sport(
:statuscode 200: sport updated
:statuscode 400: invalid payload
:statuscode 401:
- Provide a valid auth token.
- Signature expired. Please log in again.
- Invalid token. Please log in again.
:statuscode 403: You do not have permissions.
- provide a valid auth token
- signature expired, please log in again
- invalid token, please log in again
:statuscode 403: you do not have permissions
:statuscode 404: sport not found
:statuscode 500: