mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: allow switch account
This commit is contained in:
1 parent
7ca2881787
commit
89424ec9cd
7 files changed
+71
-4
No files matched your search
@@ -115,10 +115,19 @@ export class FSDownloadHandler extends Handler {
|
||||
}
|
||||
}
|
||||
|
||||
export class SwitchAccountHandler extends Handler {
|
||||
@param('uid', Types.Int)
|
||||
async get(domainId: string, uid: number) {
|
||||
this.session.uid = uid;
|
||||
this.back();
|
||||
}
|
||||
}
|
||||
|
||||
export async function apply() {
|
||||
Route('switch_language', '/language/:lang', SwitchLanguageHandler);
|
||||
Route('home_files', '/file', FilesHandler, PRIV.PRIV_CREATE_FILE);
|
||||
Route('fs_download', '/file/:uid/:filename', FSDownloadHandler);
|
||||
Route('switch_account', '/account', SwitchAccountHandler, PRIV.PRIV_EDIT_SYSTEM);
|
||||
}
|
||||
|
||||
global.Hydro.handler.misc = apply;
|
||||
Reference in new issue
Block a user