From 799031a8c7267866b52ec5fb3b1cd14a7869ce94 Mon Sep 17 00:00:00 2001 From: Brynjar Ingimarsson Date: Tue, 17 May 2022 22:55:27 +0200 Subject: [PATCH] Add method ID to response when creating a new method --- backend/app/routes/users.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/app/routes/users.py b/backend/app/routes/users.py index 94797e5..5671b05 100644 --- a/backend/app/routes/users.py +++ b/backend/app/routes/users.py @@ -259,7 +259,10 @@ def post(self, id): logger.info("Added method (type: {}) for user {} (ID: {})".format(method.type, user.username, user.id)) - return jsonify({'message': 'Successful'}), 200 + return jsonify({ + 'message': 'Successful', + 'method_id': method.id, + }), 200 class UserMethodDetailsView(MethodView):