Skip to content

Commit

Permalink
fix status code when a token already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorbin committed Jun 26, 2019
1 parent 20d9ec9 commit 6dda78f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified resources/static/andouillette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/meuse/db/token.clj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
(throw (ex-info (format "a token named %s already exists for user %s"
(:name token)
(:user token))
{})))
{:status 400})))
(let [generated-token (auth-token/generate-token)]
(jdbc/execute! db-tx (token-queries/create
(auth-token/extract-identifier generated-token)
Expand Down

0 comments on commit 6dda78f

Please sign in to comment.