Skip to content

Commit

Permalink
fix: initial account creation (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
callms authored Mar 11, 2024
1 parent 9389a36 commit 6f38f4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opengluck-server/opengluck/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ def _create_account():
data = request.get_json()
if not data:
abort(400)
assert_current_request_is_logged_in_as_admin()
if do_we_have_any_accounts():
assert_current_request_is_logged_in_as_admin()
token = create_account(data["login"], data["password"])

return Response(json.dumps({"token": token}))
Expand Down

0 comments on commit 6f38f4e

Please sign in to comment.