mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat: add login in frontend
* extract icon library from main.js * extract router from main.js * failure with error in passport * add example to swagger
This commit is contained in:
1 parent
b55b7aa1ec
commit
49417c405a
11 files changed
+206
-61
No files matched your search
@@ -11,7 +11,7 @@ const router = Router()
|
||||
|
||||
router.post(
|
||||
'/login',
|
||||
passport.authenticate('local', { session: false }),
|
||||
passport.authenticate('local', { session: false, failWithError: true }),
|
||||
issueToken
|
||||
)
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@ router.use('/auth', authRouter)
|
||||
router.use('/quests', quests)
|
||||
router.use(
|
||||
'/sessions',
|
||||
passport.authenticate('jwt', { session: false }),
|
||||
passport.authenticate('jwt', { session: false, failWithError: true }),
|
||||
sessions
|
||||
)
|
||||
router.use(
|
||||
'/commands',
|
||||
passport.authenticate('jwt', { session: false }),
|
||||
passport.authenticate('jwt', { session: false, failWithError: true }),
|
||||
commands
|
||||
)
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ paths:
|
||||
properties:
|
||||
quest_id:
|
||||
type: string
|
||||
example: helloworld
|
||||
responses:
|
||||
'201':
|
||||
description: session created
|
||||
|
||||
Reference in new issue
Block a user