core: fix

This commit is contained in:
undefined committed 2024-05-11 00:12:16 +08:00
1 parent d582617aaf
commit 380ea6b64d
1 file changed
+3 -1
+3 -1
View File
@@ -75,6 +75,8 @@ registerResolver('Query', 'users(ids: [Int], search: String, limit: Int, exact:
return udocs;
}, 'Get a list of user by ids, or search users with the prefix.');
registerResolver('User', 'avatarUrl(size: Int)', 'String', (arg, ctx) => avatar(ctx.user.avatar, arg.size || 128));
class UserLoginHandler extends Handler {
noCheckPermView = true;
@@ -227,7 +229,7 @@ class UserLogoutHandler extends Handler {
this.response.template = 'user_logout.html';
}
async post(domainId: string) {
async post({ domainId }) {
this.context.HydroContext.user = await user.getById(domainId, 0);
this.session.uid = 0;
this.session.sudo = null;