Skip to content

Commit

Permalink
Hotfix a hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratstail91 committed Dec 23, 2023
1 parent 72a4b0e commit 8ab786b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-server",
"version": "1.8.1",
"version": "1.8.2",
"description": "An API centric auth server. Uses Sequelize and mariaDB by default.",
"main": "server/server.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions server/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ router.patch('/reset', require('./password-reset'));
//logouts allowed when banned, and when the token itself is invalid
router.delete('/logout', require('./logout'));

//authenticate token
router.use(tokenAuth);

//middleware
router.use(async (req, res, next) => {
const record = await accounts.findOne({
Expand All @@ -41,9 +44,6 @@ router.use(async (req, res, next) => {
//refresh token
router.post('/token', require('./token'));

//authenticate token
router.use(tokenAuth);

//basic account management (needs a token)
router.get('/account', require('./account-query'));
router.patch('/account', require('./account-update'));
Expand Down

0 comments on commit 8ab786b

Please sign in to comment.