]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/activitypub/actor.ts
Playlist server API
[github/Chocobozzz/PeerTube.git] / server / models / activitypub / actor.ts
index dda57a8ba172264933a03fee9bf9723c40debb05..2fceb21ddf87cec326bfb59be39725361ce0b66e 100644 (file)
@@ -265,7 +265,7 @@ export class ActorModel extends Model<ActorModel> {
   VideoChannel: VideoChannelModel
 
   static load (id: number) {
-    return ActorModel.unscoped().findById(id)
+    return ActorModel.unscoped().findByPk(id)
   }
 
   static loadAccountActorByVideoId (videoId: number, transaction: Sequelize.Transaction) {
@@ -444,6 +444,7 @@ export class ActorModel extends Model<ActorModel> {
       id: this.url,
       following: this.getFollowingUrl(),
       followers: this.getFollowersUrl(),
+      playlists: this.getPlaylistsUrl(),
       inbox: this.inboxUrl,
       outbox: this.outboxUrl,
       preferredUsername: this.preferredUsername,
@@ -494,6 +495,10 @@ export class ActorModel extends Model<ActorModel> {
     return this.url + '/followers'
   }
 
+  getPlaylistsUrl () {
+    return this.url + '/playlists'
+  }
+
   getPublicKeyUrl () {
     return this.url + '#main-key'
   }