fix lint
This commit is contained in:
@ -25,12 +25,12 @@ export async function deleteAccount(job: Bull.Job<DbUserDeleteJobData>): Promise
|
||||
const notes = await Notes.find({
|
||||
where: {
|
||||
userId: user.id,
|
||||
...(cursor ? { id: MoreThan(cursor) } : {})
|
||||
...(cursor ? { id: MoreThan(cursor) } : {}),
|
||||
},
|
||||
take: 100,
|
||||
order: {
|
||||
id: 1
|
||||
}
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (notes.length === 0) {
|
||||
@ -52,12 +52,12 @@ export async function deleteAccount(job: Bull.Job<DbUserDeleteJobData>): Promise
|
||||
const files = await DriveFiles.find({
|
||||
where: {
|
||||
userId: user.id,
|
||||
...(cursor ? { id: MoreThan(cursor) } : {})
|
||||
...(cursor ? { id: MoreThan(cursor) } : {}),
|
||||
},
|
||||
take: 10,
|
||||
order: {
|
||||
id: 1
|
||||
}
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (files.length === 0) {
|
||||
|
@ -24,12 +24,12 @@ export async function deleteDriveFiles(job: Bull.Job<DbUserJobData>, done: any):
|
||||
const files = await DriveFiles.find({
|
||||
where: {
|
||||
userId: user.id,
|
||||
...(cursor ? { id: MoreThan(cursor) } : {})
|
||||
...(cursor ? { id: MoreThan(cursor) } : {}),
|
||||
},
|
||||
take: 100,
|
||||
order: {
|
||||
id: 1
|
||||
}
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (files.length === 0) {
|
||||
|
@ -40,12 +40,12 @@ export async function exportBlocking(job: Bull.Job<DbUserJobData>, done: any): P
|
||||
const blockings = await Blockings.find({
|
||||
where: {
|
||||
blockerId: user.id,
|
||||
...(cursor ? { id: MoreThan(cursor) } : {})
|
||||
...(cursor ? { id: MoreThan(cursor) } : {}),
|
||||
},
|
||||
take: 100,
|
||||
order: {
|
||||
id: 1
|
||||
}
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (blockings.length === 0) {
|
||||
|
@ -40,12 +40,12 @@ export async function exportFollowing(job: Bull.Job<DbUserJobData>, done: any):
|
||||
const followings = await Followings.find({
|
||||
where: {
|
||||
followerId: user.id,
|
||||
...(cursor ? { id: MoreThan(cursor) } : {})
|
||||
...(cursor ? { id: MoreThan(cursor) } : {}),
|
||||
},
|
||||
take: 100,
|
||||
order: {
|
||||
id: 1
|
||||
}
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (followings.length === 0) {
|
||||
|
@ -40,12 +40,12 @@ export async function exportMute(job: Bull.Job<DbUserJobData>, done: any): Promi
|
||||
const mutes = await Mutings.find({
|
||||
where: {
|
||||
muterId: user.id,
|
||||
...(cursor ? { id: MoreThan(cursor) } : {})
|
||||
...(cursor ? { id: MoreThan(cursor) } : {}),
|
||||
},
|
||||
take: 100,
|
||||
order: {
|
||||
id: 1
|
||||
}
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (mutes.length === 0) {
|
||||
|
@ -22,7 +22,7 @@ export async function exportUserLists(job: Bull.Job<DbUserJobData>, done: any):
|
||||
}
|
||||
|
||||
const lists = await UserLists.find({
|
||||
userId: user.id
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
// Create temp file
|
||||
@ -40,7 +40,7 @@ export async function exportUserLists(job: Bull.Job<DbUserJobData>, done: any):
|
||||
for (const list of lists) {
|
||||
const joinings = await UserListJoinings.find({ userListId: list.id });
|
||||
const users = await Users.find({
|
||||
id: In(joinings.map(j => j.userId))
|
||||
id: In(joinings.map(j => j.userId)),
|
||||
});
|
||||
|
||||
for (const u of users) {
|
||||
|
@ -21,7 +21,7 @@ export async function importBlocking(job: Bull.Job<DbUserImportJobData>, done: a
|
||||
}
|
||||
|
||||
const file = await DriveFiles.findOne({
|
||||
id: job.data.fileId
|
||||
id: job.data.fileId,
|
||||
});
|
||||
if (file == null) {
|
||||
done();
|
||||
@ -41,10 +41,10 @@ export async function importBlocking(job: Bull.Job<DbUserImportJobData>, done: a
|
||||
|
||||
let target = isSelfHost(host!) ? await Users.findOne({
|
||||
host: null,
|
||||
usernameLower: username.toLowerCase()
|
||||
usernameLower: username.toLowerCase(),
|
||||
}) : await Users.findOne({
|
||||
host: toPuny(host!),
|
||||
usernameLower: username.toLowerCase()
|
||||
usernameLower: username.toLowerCase(),
|
||||
});
|
||||
|
||||
if (host == null && target == null) continue;
|
||||
|
@ -21,7 +21,7 @@ export async function importFollowing(job: Bull.Job<DbUserImportJobData>, done:
|
||||
}
|
||||
|
||||
const file = await DriveFiles.findOne({
|
||||
id: job.data.fileId
|
||||
id: job.data.fileId,
|
||||
});
|
||||
if (file == null) {
|
||||
done();
|
||||
@ -41,10 +41,10 @@ export async function importFollowing(job: Bull.Job<DbUserImportJobData>, done:
|
||||
|
||||
let target = isSelfHost(host!) ? await Users.findOne({
|
||||
host: null,
|
||||
usernameLower: username.toLowerCase()
|
||||
usernameLower: username.toLowerCase(),
|
||||
}) : await Users.findOne({
|
||||
host: toPuny(host!),
|
||||
usernameLower: username.toLowerCase()
|
||||
usernameLower: username.toLowerCase(),
|
||||
});
|
||||
|
||||
if (host == null && target == null) continue;
|
||||
|
@ -22,7 +22,7 @@ export async function importMuting(job: Bull.Job<DbUserImportJobData>, done: any
|
||||
}
|
||||
|
||||
const file = await DriveFiles.findOne({
|
||||
id: job.data.fileId
|
||||
id: job.data.fileId,
|
||||
});
|
||||
if (file == null) {
|
||||
done();
|
||||
@ -42,10 +42,10 @@ export async function importMuting(job: Bull.Job<DbUserImportJobData>, done: any
|
||||
|
||||
let target = isSelfHost(host!) ? await Users.findOne({
|
||||
host: null,
|
||||
usernameLower: username.toLowerCase()
|
||||
usernameLower: username.toLowerCase(),
|
||||
}) : await Users.findOne({
|
||||
host: toPuny(host!),
|
||||
usernameLower: username.toLowerCase()
|
||||
usernameLower: username.toLowerCase(),
|
||||
});
|
||||
|
||||
if (host == null && target == null) continue;
|
||||
|
@ -22,7 +22,7 @@ export async function importUserLists(job: Bull.Job<DbUserImportJobData>, done:
|
||||
}
|
||||
|
||||
const file = await DriveFiles.findOne({
|
||||
id: job.data.fileId
|
||||
id: job.data.fileId,
|
||||
});
|
||||
if (file == null) {
|
||||
done();
|
||||
@ -42,7 +42,7 @@ export async function importUserLists(job: Bull.Job<DbUserImportJobData>, done:
|
||||
|
||||
let list = await UserLists.findOne({
|
||||
userId: user.id,
|
||||
name: listName
|
||||
name: listName,
|
||||
});
|
||||
|
||||
if (list == null) {
|
||||
@ -51,16 +51,16 @@ export async function importUserLists(job: Bull.Job<DbUserImportJobData>, done:
|
||||
createdAt: new Date(),
|
||||
userId: user.id,
|
||||
name: listName,
|
||||
userIds: []
|
||||
userIds: [],
|
||||
});
|
||||
}
|
||||
|
||||
let target = isSelfHost(host!) ? await Users.findOne({
|
||||
host: null,
|
||||
usernameLower: username.toLowerCase()
|
||||
usernameLower: username.toLowerCase(),
|
||||
}) : await Users.findOne({
|
||||
host: toPuny(host!),
|
||||
usernameLower: username.toLowerCase()
|
||||
usernameLower: username.toLowerCase(),
|
||||
});
|
||||
|
||||
if (target == null) {
|
||||
|
Reference in New Issue
Block a user