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) {
|
||||
|
@@ -33,7 +33,7 @@ export default async (job: Bull.Job<DeliverJobData>) => {
|
||||
if (suspendedHosts == null) {
|
||||
suspendedHosts = await Instances.find({
|
||||
where: {
|
||||
isSuspended: true
|
||||
isSuspended: true,
|
||||
},
|
||||
});
|
||||
suspendedHostsCache.set(null, suspendedHosts);
|
||||
@@ -55,7 +55,7 @@ export default async (job: Bull.Job<DeliverJobData>) => {
|
||||
latestRequestSentAt: new Date(),
|
||||
latestStatus: 200,
|
||||
lastCommunicatedAt: new Date(),
|
||||
isNotResponding: false
|
||||
isNotResponding: false,
|
||||
});
|
||||
|
||||
fetchInstanceMetadata(i);
|
||||
@@ -70,7 +70,7 @@ export default async (job: Bull.Job<DeliverJobData>) => {
|
||||
Instances.update(i.id, {
|
||||
latestRequestSentAt: new Date(),
|
||||
latestStatus: res instanceof StatusError ? res.statusCode : null,
|
||||
isNotResponding: true
|
||||
isNotResponding: true,
|
||||
});
|
||||
|
||||
instanceChart.requestSent(i.host, false);
|
||||
|
@@ -135,7 +135,7 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => {
|
||||
Instances.update(i.id, {
|
||||
latestRequestReceivedAt: new Date(),
|
||||
lastCommunicatedAt: new Date(),
|
||||
isNotResponding: false
|
||||
isNotResponding: false,
|
||||
});
|
||||
|
||||
fetchInstanceMetadata(i);
|
||||
|
@@ -18,12 +18,12 @@ export default async function cleanRemoteFiles(job: Bull.Job<Record<string, unkn
|
||||
where: {
|
||||
userHost: Not(IsNull()),
|
||||
isLink: false,
|
||||
...(cursor ? { id: MoreThan(cursor) } : {})
|
||||
...(cursor ? { id: MoreThan(cursor) } : {}),
|
||||
},
|
||||
take: 8,
|
||||
order: {
|
||||
id: 1
|
||||
}
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (files.length === 0) {
|
||||
|
Reference in New Issue
Block a user