1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

feat(plugins): add filter:api.user.me.get.result

relates to #6219
This commit is contained in:
kontrollanten 2024-03-26 11:51:02 +01:00 committed by Chocobozzz
parent bfa7e364bf
commit aaa5acbb0c
4 changed files with 28 additions and 2 deletions

View file

@ -160,7 +160,13 @@ async function getUserInformation (req: express.Request, res: express.Response)
// We did not load channels in res.locals.user
const user = await UserModel.loadForMeAPI(res.locals.oauth.token.user.id)
return res.json(user.toMeFormattedJSON())
const result = await Hooks.wrapObject(
user.toMeFormattedJSON(),
'filter:api.user.me.get.result',
{ user }
)
return res.json(result)
}
async function getUserVideoQuotaUsed (req: express.Request, res: express.Response) {