mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
a11y: init
This commit is contained in:
3 files changed
+14
-4
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import { Context, UserModel } from 'hydrooj';
|
||||
|
||||
export async function apply(ctx: Context) {
|
||||
// Auto authorize user 2 as super admin
|
||||
ctx.on('handler/after/UserRegisterWithCode#post', async (that) => {
|
||||
if (that.session.uid === 2) await UserModel.setSuperAdmin(2);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user