12.109.1-nca10.net-v1

This commit is contained in:
nullnyat
2022-04-02 17:20:22 +09:00
parent 483c97e224
commit 2f621ceb7a
439 changed files with 4682 additions and 3360 deletions

View File

@ -16,7 +16,7 @@ const logger = queueLogger.createSubLogger('export-following');
export async function exportFollowing(job: Bull.Job<DbUserJobData>, done: () => void): Promise<void> {
logger.info(`Exporting following of ${job.data.user.id} ...`);
const user = await Users.findOne(job.data.user.id);
const user = await Users.findOneBy({ id: job.data.user.id });
if (user == null) {
done();
return;
@ -36,7 +36,7 @@ export async function exportFollowing(job: Bull.Job<DbUserJobData>, done: () =>
let cursor: Following['id'] | null = null;
const mutings = job.data.excludeMuting ? await Mutings.find({
const mutings = job.data.excludeMuting ? await Mutings.findBy({
muterId: user.id,
}) : [];
@ -60,7 +60,7 @@ export async function exportFollowing(job: Bull.Job<DbUserJobData>, done: () =>
cursor = followings[followings.length - 1].id;
for (const following of followings) {
const u = await Users.findOne({ id: following.followeeId });
const u = await Users.findOneBy({ id: following.followeeId });
if (u == null) {
continue;
}