Factorize rest-table and fix/simplify SQL
[oweals/peertube.git] / server / models / account / account-blocklist.ts
index fe2d5d010331147800195802408871c96448b0cf..d8a7ce4b4a5a6f26e62fbd91322e2a6d512f4b2c 100644 (file)
@@ -133,8 +133,8 @@ export class AccountBlocklistModel extends Model<AccountBlocklistModel> {
     if (search) {
       Object.assign(where, {
         [Op.or]: [
-          { ...searchAttribute(search, '$BlockedAccount.name$') },
-          { ...searchAttribute(search, '$BlockedAccount.Actor.url$') }
+          searchAttribute(search, '$BlockedAccount.name$'),
+          searchAttribute(search, '$BlockedAccount.Actor.url$')
         ]
       })
     }