]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/account/account.ts
Refactor middleware helpers
[github/Chocobozzz/PeerTube.git] / server / models / account / account.ts
index 2b04acd863743d3a6e8c69462165741d83350ece..09cada0967abf5ad39c820fbd20ee888717fa9ee 100644 (file)
@@ -47,7 +47,7 @@ export enum ScopeNames {
       attributes: [ 'id', 'name' ],
       include: [
         {
-          attributes: [ 'id', 'uuid', 'preferredUsername', 'url', 'serverId', 'avatarId' ],
+          attributes: [ 'id', 'preferredUsername', 'url', 'serverId', 'avatarId' ],
           model: ActorModel.unscoped(),
           required: true,
           where: whereActor,
@@ -180,22 +180,6 @@ export class AccountModel extends Model<AccountModel> {
     return AccountModel.findByPk(id, { transaction })
   }
 
-  static loadByUUID (uuid: string) {
-    const query = {
-      include: [
-        {
-          model: ActorModel,
-          required: true,
-          where: {
-            uuid
-          }
-        }
-      ]
-    }
-
-    return AccountModel.findOne(query)
-  }
-
   static loadByNameWithHost (nameWithHost: string) {
     const [ accountName, host ] = nameWithHost.split('@')
 
@@ -332,7 +316,6 @@ export class AccountModel extends Model<AccountModel> {
 
     return {
       id: this.id,
-      uuid: actor.uuid,
       name: actor.name,
       displayName: this.getDisplayName(),
       url: actor.url,