Skip to content

Commit

Permalink
Add authorization check for onetimesecrets
Browse files Browse the repository at this point in the history
  • Loading branch information
steunix committed Sep 21, 2024
1 parent 1c4ee24 commit 334e695
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1/routes/onetimetokens.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
*/

import { Router } from 'express'
import * as auth from '../../../lib/auth.mjs'

import * as oneTimeTokensController from '../controllers/onetimetokens.mjs'

const router = Router({mergeParams:true})

// Validation middleware
router.use(/\/$/, auth.validateJWT)

router.post('/', oneTimeTokensController.create)

router.get('/:id', oneTimeTokensController.get)
Expand Down

0 comments on commit 334e695

Please sign in to comment.