migrate: add universaloj & hustoj upload file (#553)

Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
pandaandundefined authored and GitHub committed 2023-05-10 19:25:05 +08:00
1 parent e07fe63368
commit d20c405da9
5 files changed
+617 -22

No files matched your search

+4 -2
View File
@@ -125,8 +125,10 @@ export async function run({
udoc.email || `${udoc.username}@syzoj.local`, udoc.username, '',
null, udoc.ip, SystemModel.get('default.priv'),
);
if (udoc.is_admin) await UserModel.setSuperAdmin(uid);
superAdmin.push(uid);
if (udoc.is_admin) {
await UserModel.setSuperAdmin(uid);
superAdmin.push(uid);
}
uidMap[udoc.id] = uid;
await UserModel.setById(uid, {
regat: new Date(udoc.register_time * 1000),