refactor(server): use insert instead of save

This commit is contained in:
syuilo
2022-01-03 02:20:30 +09:00
parent 4a64280a7c
commit 6be1db00d1
9 changed files with 19 additions and 18 deletions

View File

@ -46,13 +46,13 @@ export async function importUserLists(job: Bull.Job<DbUserImportJobData>, done:
});
if (list == null) {
list = await UserLists.save({
list = await UserLists.insert({
id: genId(),
createdAt: new Date(),
userId: user.id,
name: listName,
userIds: [],
});
}).then(x => UserLists.findOneOrFail(x.identifiers[0]));
}
let target = isSelfHost(host!) ? await Users.findOne({