refacator: fix typw
This commit is contained in:
parent
1dc06f7ad3
commit
b6db709e02
7 changed files with 7 additions and 8 deletions
|
@ -31,7 +31,7 @@ export async function deleteAccount(job: Bull.Job<DbUserDeleteJobData>): Promise
|
||||||
order: {
|
order: {
|
||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
});
|
}) as Note[];
|
||||||
|
|
||||||
if (notes.length === 0) {
|
if (notes.length === 0) {
|
||||||
break;
|
break;
|
||||||
|
@ -58,7 +58,7 @@ export async function deleteAccount(job: Bull.Job<DbUserDeleteJobData>): Promise
|
||||||
order: {
|
order: {
|
||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
});
|
}) as DriveFile[];
|
||||||
|
|
||||||
if (files.length === 0) {
|
if (files.length === 0) {
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -75,7 +75,7 @@ export async function exportCustomEmojis(job: Bull.Job, done: () => void): Promi
|
||||||
await downloadUrl(emoji.originalUrl, emojiPath);
|
await downloadUrl(emoji.originalUrl, emojiPath);
|
||||||
downloaded = true;
|
downloaded = true;
|
||||||
} catch (e) { // TODO: 何度か再試行
|
} catch (e) { // TODO: 何度か再試行
|
||||||
logger.error(e);
|
logger.error(e instanceof Error ? e : new Error(e as string));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!downloaded) {
|
if (!downloaded) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ export async function exportFollowing(job: Bull.Job<DbUserJobData>, done: () =>
|
||||||
order: {
|
order: {
|
||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
});
|
}) as Following[];
|
||||||
|
|
||||||
if (followings.length === 0) {
|
if (followings.length === 0) {
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -62,7 +62,7 @@ export async function exportNotes(job: Bull.Job<DbUserJobData>, done: any): Prom
|
||||||
order: {
|
order: {
|
||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
});
|
}) as Note[];
|
||||||
|
|
||||||
if (notes.length === 0) {
|
if (notes.length === 0) {
|
||||||
job.progress(100);
|
job.progress(100);
|
||||||
|
|
|
@ -199,7 +199,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
|
||||||
throw new Error('already registered');
|
throw new Error('already registered');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.error(e);
|
logger.error(e instanceof Error ? e : new Error(e as string));
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,6 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||||
|
|
||||||
await PromoNotes.insert({
|
await PromoNotes.insert({
|
||||||
noteId: note.id,
|
noteId: note.id,
|
||||||
createdAt: new Date(),
|
|
||||||
expiresAt: new Date(ps.expiresAt),
|
expiresAt: new Date(ps.expiresAt),
|
||||||
userId: note.userId,
|
userId: note.userId,
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,7 +13,7 @@ import renderCreate from '@/remote/activitypub/renderer/create';
|
||||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||||
import { deliver } from '@/queue/index';
|
import { deliver } from '@/queue/index';
|
||||||
|
|
||||||
export async function createMessage(user: { id: User['id']; host: User['host']; }, recipientUser: User | undefined, recipientGroup: UserGroup | undefined, text: string | undefined, file: DriveFile | null, uri?: string) {
|
export async function createMessage(user: { id: User['id']; host: User['host']; }, recipientUser: User | undefined, recipientGroup: UserGroup | undefined, text: string | null | undefined, file: DriveFile | null, uri?: string) {
|
||||||
const message = {
|
const message = {
|
||||||
id: genId(),
|
id: genId(),
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
|
|
Loading…
Reference in a new issue