#6930 - Use ScopedToken when share Multimedia files #2094

Merged
jsegarra merged 19 commits from 6930_scopedToken_Multimedia into dev 2024-03-15 08:28:05 +00:00
1 changed files with 5 additions and 1 deletions
Showing only changes of commit a078de9521 - Show all commits

View File

@ -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) {