+ return res.json(getFormattedObjects(resultList.data, resultList.total))
+}
+
+async function listAccountFollowers (req: express.Request, res: express.Response) {
+ const account = res.locals.account
+
+ const channels = await VideoChannelModel.listAllByAccount(account.id)
+ const actorIds = [ account.actorId ].concat(channels.map(c => c.actorId))
+
+ const resultList = await ActorFollowModel.listFollowersForApi({
+ actorIds,
+ start: req.query.start,
+ count: req.query.count,
+ sort: req.query.sort,
+ search: req.query.search,
+ state: 'accepted'
+ })
+
+ return res.json(getFormattedObjects(resultList.data, resultList.total))