import accept from "./accept.js";
import { FollowRequests, Users } from "../../../models/index.js";
/**
 * Approve all follow requests for the specified user
 * @param user User.
 */ export default async function(user) {
    const requests = await FollowRequests.findBy({
        followeeId: user.id
    });
    for (const request of requests){
        const follower = await Users.findOneByOrFail({
            id: request.followerId
        });
        accept(user, follower);
    }
}
