You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
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);
|
|
});
|
|
}
|