diff options
Diffstat (limited to 'web-server/opendc/api/v2/users')
| -rw-r--r-- | web-server/opendc/api/v2/users/endpoint.py | 6 | ||||
| -rw-r--r-- | web-server/opendc/api/v2/users/userId/endpoint.py | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/web-server/opendc/api/v2/users/endpoint.py b/web-server/opendc/api/v2/users/endpoint.py index c6041756..c597732f 100644 --- a/web-server/opendc/api/v2/users/endpoint.py +++ b/web-server/opendc/api/v2/users/endpoint.py @@ -1,6 +1,4 @@ from opendc.models.user import User -from opendc.util import exceptions -from opendc.util.database import DB from opendc.util.rest import Response @@ -13,7 +11,7 @@ def GET(request): user.check_exists() - return Response(200, f'Successfully retrieved user.', user.obj) + return Response(200, 'Successfully retrieved user.', user.obj) def POST(request): @@ -28,4 +26,4 @@ def POST(request): user.check_already_exists() user.insert() - return Response(200, f'Successfully created user.', user.obj) + return Response(200, 'Successfully created user.', user.obj) diff --git a/web-server/opendc/api/v2/users/userId/endpoint.py b/web-server/opendc/api/v2/users/userId/endpoint.py index e68a2bb3..660083b6 100644 --- a/web-server/opendc/api/v2/users/userId/endpoint.py +++ b/web-server/opendc/api/v2/users/userId/endpoint.py @@ -1,5 +1,4 @@ from opendc.models.user import User -from opendc.util import exceptions from opendc.util.rest import Response @@ -12,7 +11,7 @@ def GET(request): user.check_exists() - return Response(200, f'Successfully retrieved user.', user.obj) + return Response(200, 'Successfully retrieved user.', user.obj) def PUT(request): @@ -34,7 +33,7 @@ def PUT(request): user.update() - return Response(200, f'Successfully updated user.', user.obj) + return Response(200, 'Successfully updated user.', user.obj) def DELETE(request): @@ -49,4 +48,4 @@ def DELETE(request): user.delete() - return Response(200, f'Successfully deleted user.', user.obj) + return Response(200, 'Successfully deleted user.', user.obj) |
