+ static getBlockStatus (byAccountIds: number[], hosts: string[]): Promise<{ host: string, accountId: number }[]> {
+ const rawQuery = `SELECT "server"."host", "serverBlocklist"."accountId" ` +
+ `FROM "serverBlocklist" ` +
+ `INNER JOIN "server" ON "server"."id" = "serverBlocklist"."targetServerId" ` +
+ `WHERE "server"."host" IN (:hosts) ` +
+ `AND "serverBlocklist"."accountId" IN (${createSafeIn(ServerBlocklistModel.sequelize, byAccountIds)})`
+
+ return ServerBlocklistModel.sequelize.query(rawQuery, {
+ type: QueryTypes.SELECT as QueryTypes.SELECT,
+ replacements: { hosts }
+ })
+ }
+