mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-13 09:10:47 +01:00
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: {
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
}) as Note[];
|
||||
|
||||
if (notes.length === 0) {
|
||||
break;
|
||||
|
@ -58,7 +58,7 @@ export async function deleteAccount(job: Bull.Job<DbUserDeleteJobData>): Promise
|
|||
order: {
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
}) as DriveFile[];
|
||||
|
||||
if (files.length === 0) {
|
||||
break;
|
||||
|
|
|
@ -75,7 +75,7 @@ export async function exportCustomEmojis(job: Bull.Job, done: () => void): Promi
|
|||
await downloadUrl(emoji.originalUrl, emojiPath);
|
||||
downloaded = true;
|
||||
} catch (e) { // TODO: 何度か再試行
|
||||
logger.error(e);
|
||||
logger.error(e instanceof Error ? e : new Error(e as string));
|
||||
}
|
||||
|
||||
if (!downloaded) {
|
||||
|
|
|
@ -51,7 +51,7 @@ export async function exportFollowing(job: Bull.Job<DbUserJobData>, done: () =>
|
|||
order: {
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
}) as Following[];
|
||||
|
||||
if (followings.length === 0) {
|
||||
break;
|
||||
|
|
|
@ -62,7 +62,7 @@ export async function exportNotes(job: Bull.Job<DbUserJobData>, done: any): Prom
|
|||
order: {
|
||||
id: 1,
|
||||
},
|
||||
});
|
||||
}) as Note[];
|
||||
|
||||
if (notes.length === 0) {
|
||||
job.progress(100);
|
||||
|
|
|
@ -199,7 +199,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
|
|||
throw new Error('already registered');
|
||||
}
|
||||
} else {
|
||||
logger.error(e);
|
||||
logger.error(e instanceof Error ? e : new Error(e as string));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
|
||||
await PromoNotes.insert({
|
||||
noteId: note.id,
|
||||
createdAt: new Date(),
|
||||
expiresAt: new Date(ps.expiresAt),
|
||||
userId: note.userId,
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@ import renderCreate from '@/remote/activitypub/renderer/create';
|
|||
import { renderActivity } from '@/remote/activitypub/renderer/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 = {
|
||||
id: genId(),
|
||||
createdAt: new Date(),
|
||||
|
|
Loading…
Reference in a new issue