server: use named export for acceptAllFollowRequests

This commit is contained in:
Norm 2022-12-22 16:41:27 -05:00
parent b11e4053db
commit 2204adc657
Signed by: norm
GPG key ID: 7123E30E441E80DE
2 changed files with 4 additions and 4 deletions

View file

@ -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';

View file

@ -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<void> {
const requests = await FollowRequests.findBy({
followeeId: user.id,
});