mirror of
https://github.com/samanhappy/mcphub.git
synced 2026-01-10 08:38:23 -05:00
Add PostgreSQL-backed data storage support (#444)
Co-authored-by: samanhappy <samanhappy@gmail.com>
This commit is contained in:
@@ -72,8 +72,8 @@ export const auth = async (req: Request, res: Response, next: NextFunction): Pro
|
||||
if (oauthToken && oauthToken.accessToken === accessToken) {
|
||||
// Valid OAuth token - look up user to get admin status
|
||||
const { findUserByUsername } = await import('../models/User.js');
|
||||
const user = findUserByUsername(oauthToken.username);
|
||||
|
||||
const user = await findUserByUsername(oauthToken.username);
|
||||
|
||||
// Set user context with proper admin status
|
||||
(req as any).user = {
|
||||
username: oauthToken.username,
|
||||
|
||||
Reference in New Issue
Block a user