Update users.py

New user token returns 200 instead of 201 Fixes #3642
This commit is contained in:
Joe Gasewicz
2021-10-07 16:31:23 +01:00
committed by GitHub
parent 9209ccd0de
commit fe276eac64

View File

@@ -420,6 +420,7 @@ class UserTokenListAPIHandler(APIHandler):
# retrieve the model
token_model = self.token_model(orm.APIToken.find(self.db, api_token))
token_model['token'] = api_token
self.set_status(201)
self.write(json.dumps(token_model))