Skip to content

Commit

Permalink
add api check token (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksibisamir committed May 16, 2023
2 parents c9e2306 + 4e10844 commit d0c1d60
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/login.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -991,3 +991,8 @@ module.exports.signupRequest = async (req, res) => {
)
}
}


module.exports.verifyExpiredToken = (req, res) => {
return responseHandler.makeResponseData(res, 200, 'success', true)
}
8 changes: 8 additions & 0 deletions routes/login.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const {
getToken,
setVisitSignUpStep,
signupRequest,
verifyExpiredToken
} = require('../controllers/login.controller')
const {
emailConnection,
Expand Down Expand Up @@ -1117,4 +1118,11 @@ router.post('/setVisitSignUpStep', setVisitSignUpStep)
*/
router.post('/email/signup', signupRequest)





router.get('/verify-token', verifyAuth, verifyExpiredToken)


module.exports = router

0 comments on commit d0c1d60

Please sign in to comment.