From a078de95210a4e99aba1cffea2050761312d0445 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 26 Feb 2024 06:51:19 +0100 Subject: [PATCH] refs #6930 feat: return multimediaToken when login --- back/models/vn-user.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/back/models/vn-user.js b/back/models/vn-user.js index 3a416d7e3..e1bce7c06 100644 --- a/back/models/vn-user.js +++ b/back/models/vn-user.js @@ -167,7 +167,11 @@ module.exports = function(Self) { console.warn(err); } - return {token: token.id, ttl: token.ttl}; + const multimediaToken = await token.user().accessTokens.create({ + scopes: ['read:multimedia'] + }); + + return {token: token.id, ttl: token.ttl, multimediaToken}; }; Self.userUses = function(user) {