mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
添加退出登录功能
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ const route = Router();
|
||||
export default (app: Router) => {
|
||||
app.use('/', route);
|
||||
route.post(
|
||||
'/auth',
|
||||
'/login',
|
||||
async (req: Request, res: Response, next: NextFunction) => {
|
||||
const logger: Logger = Container.get('logger');
|
||||
try {
|
||||
|
||||
@@ -13,7 +13,7 @@ export default ({ app }: { app: Application }) => {
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
app.use(
|
||||
jwt({ secret: config.secret as string, algorithms: ['HS384'] }).unless({
|
||||
path: ['/api/auth'],
|
||||
path: ['/api/login'],
|
||||
}),
|
||||
);
|
||||
app.use(config.api.prefix, routes());
|
||||
|
||||
Reference in New Issue
Block a user