feat: cookie和domain优化
This commit is contained in:
@@ -34,15 +34,14 @@ app
|
||||
}
|
||||
user.setTokenUser(tokenUser);
|
||||
const orgs = await user.getOrgs();
|
||||
|
||||
if (orgs.includes('admin')) {
|
||||
ctx.body = 'admin';
|
||||
ctx.nextQuery = ctx.query;
|
||||
} else {
|
||||
ctx.throw(403, 'forbidden');
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('auth-admin error', e);
|
||||
console.error(`auth-admin error`, e);
|
||||
console.error('tokenUser', tokenUser?.id, tokenUser?.username, tokenUser?.uid);
|
||||
ctx.throw(500, e.message);
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user