mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
feat: Support multiple concurrent login sessions per platform (#2816)
* Initial plan * Implement multi-device login support - allow multiple concurrent sessions Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Address code review feedback - extract constants and utility functions Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Add validation and logging improvements based on code review Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Revert unnecessary file changes - keep only multi-device login feature files Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
+3
-2
@@ -8,7 +8,7 @@ import path from 'path';
|
||||
import { v4 as uuidV4 } from 'uuid';
|
||||
import rateLimit from 'express-rate-limit';
|
||||
import config from '../config';
|
||||
import { isDemoEnv } from '../config/util';
|
||||
import { isDemoEnv, getToken } from '../config/util';
|
||||
const route = Router();
|
||||
|
||||
const storage = multer.diskStorage({
|
||||
@@ -56,7 +56,8 @@ export default (app: Router) => {
|
||||
const logger: Logger = Container.get('logger');
|
||||
try {
|
||||
const userService = Container.get(UserService);
|
||||
await userService.logout(req.platform);
|
||||
const token = getToken(req);
|
||||
await userService.logout(req.platform, token);
|
||||
res.send({ code: 200 });
|
||||
} catch (e) {
|
||||
return next(e);
|
||||
|
||||
Reference in New Issue
Block a user