From 2204adc6576b3bd7abe1de667ac124e4f3a745b3 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Thu, 22 Dec 2022 16:41:27 -0500 Subject: [PATCH] server: use named export for acceptAllFollowRequests --- packages/backend/src/server/api/endpoints/i/update.ts | 2 +- .../backend/src/services/following/requests/accept-all.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 57c349803..d73f2111a 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -2,7 +2,7 @@ import RE2 from 're2'; import * as mfm from 'mfm-js'; import { notificationTypes } from 'foundkey-js'; import { publishMainStream, publishUserEvent } from '@/services/stream.js'; -import acceptAllFollowRequests from '@/services/following/requests/accept-all.js'; +import { acceptAllFollowRequests } from '@/services/following/requests/accept-all.js'; import { publishToFollowers } from '@/services/i/update.js'; import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js'; import { extractHashtags } from '@/misc/extract-hashtags.js'; diff --git a/packages/backend/src/services/following/requests/accept-all.ts b/packages/backend/src/services/following/requests/accept-all.ts index 58b15af01..ccc608c28 100644 --- a/packages/backend/src/services/following/requests/accept-all.ts +++ b/packages/backend/src/services/following/requests/accept-all.ts @@ -3,10 +3,10 @@ import { FollowRequests, Users } from '@/models/index.js'; import { acceptFollowRequest } from './accept.js'; /** - * 指定したユーザー宛てのフォローリクエストをすべて承認 - * @param user ユーザー + * Approve all follow requests addressed to the specified user. + * @param user The user whom to accept all follow requests to */ -export default async function(user: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }) { +export async function acceptAllFollowRequests(user: User): Promise { const requests = await FollowRequests.findBy({ followeeId: user.id, });