mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
refactor
This commit is contained in:
parent
7868d202f8
commit
1925dc208d
1 changed files with 2 additions and 3 deletions
|
@ -51,7 +51,6 @@ export async function importUserLists(job: Bull.Job<DbUserImportJobData>, done:
|
|||
createdAt: new Date(),
|
||||
userId: user.id,
|
||||
name: listName,
|
||||
userIds: [],
|
||||
}).then(x => UserLists.findOneOrFail(x.identifiers[0]));
|
||||
}
|
||||
|
||||
|
@ -67,9 +66,9 @@ export async function importUserLists(job: Bull.Job<DbUserImportJobData>, done:
|
|||
target = await resolveUser(username, host);
|
||||
}
|
||||
|
||||
if (await UserListJoinings.findOne({ userListId: list.id, userId: target.id }) != null) continue;
|
||||
if (await UserListJoinings.findOne({ userListId: list!.id, userId: target.id }) != null) continue;
|
||||
|
||||
pushUserToUserList(target, list);
|
||||
pushUserToUserList(target, list!);
|
||||
} catch (e) {
|
||||
logger.warn(`Error in line:${linenum} ${e}`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue