aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/user.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-05 15:26:28 +0200
committerChocobozzz <me@florianbigard.com>2021-05-05 15:26:28 +0200
commitb31d72625dd32143a45277528b90bb67a881f249 (patch)
tree7721accc994121de668933672a3d51b892e3cb77 /server/models/account/user.ts
parent7a22a0a56aa75fbb1ba986a5d2c606e1343f30c2 (diff)
downloadPeerTube-b31d72625dd32143a45277528b90bb67a881f249.tar.gz
PeerTube-b31d72625dd32143a45277528b90bb67a881f249.tar.zst
PeerTube-b31d72625dd32143a45277528b90bb67a881f249.zip
Plugin user.getAuthUser is now async
So we can load the full user
Diffstat (limited to 'server/models/account/user.ts')
-rw-r--r--server/models/account/user.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/models/account/user.ts b/server/models/account/user.ts
index 00c6d73aa..513455773 100644
--- a/server/models/account/user.ts
+++ b/server/models/account/user.ts
@@ -565,6 +565,10 @@ export class UserModel extends Model {
565 return UserModel.unscoped().findByPk(id) 565 return UserModel.unscoped().findByPk(id)
566 } 566 }
567 567
568 static loadByIdFull (id: number): Promise<MUserDefault> {
569 return UserModel.findByPk(id)
570 }
571
568 static loadByIdWithChannels (id: number, withStats = false): Promise<MUserDefault> { 572 static loadByIdWithChannels (id: number, withStats = false): Promise<MUserDefault> {
569 const scopes = [ 573 const scopes = [
570 ScopeNames.WITH_VIDEOCHANNELS 574 ScopeNames.WITH_VIDEOCHANNELS