From c2962505115563ad1510e8116f3b362887cac71f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 26 Oct 2017 16:59:02 +0200 Subject: Remove sequelize deprecated operators --- server/models/request/request-to-pod.ts | 2 +- server/models/request/request-video-event.ts | 4 ++-- server/models/request/request-video-qadu.ts | 4 ++-- server/models/request/request.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'server/models/request') diff --git a/server/models/request/request-to-pod.ts b/server/models/request/request-to-pod.ts index 6678ed290..4e14e918b 100644 --- a/server/models/request/request-to-pod.ts +++ b/server/models/request/request-to-pod.ts @@ -41,7 +41,7 @@ removeByRequestIdsAndPod = function (requestsIds: number[], podId: number) { const query = { where: { requestId: { - $in: requestsIds + [Sequelize.Op.in]: requestsIds }, podId: podId } diff --git a/server/models/request/request-video-event.ts b/server/models/request/request-video-event.ts index d7dce9bc8..8954407e1 100644 --- a/server/models/request/request-video-event.ts +++ b/server/models/request/request-video-event.ts @@ -111,7 +111,7 @@ listWithLimitAndRandom = function (limitPods: number, limitRequestsPerPod: numbe model: RequestVideoEvent['sequelize'].models.Pod, where: { id: { - $in: podIds + [Sequelize.Op.in]: podIds } } } @@ -135,7 +135,7 @@ removeByRequestIdsAndPod = function (ids: number[], podId: number) { const query = { where: { id: { - $in: ids + [Sequelize.Op.in]: ids } }, include: [ diff --git a/server/models/request/request-video-qadu.ts b/server/models/request/request-video-qadu.ts index 9c97812b9..93cf249b3 100644 --- a/server/models/request/request-video-qadu.ts +++ b/server/models/request/request-video-qadu.ts @@ -101,7 +101,7 @@ listWithLimitAndRandom = function (limitPods: number, limitRequestsPerPod: numbe model: RequestVideoQadu['sequelize'].models.Pod, where: { id: { - $in: podIds + [Sequelize.Op.in]: podIds } } }, @@ -122,7 +122,7 @@ removeByRequestIdsAndPod = function (ids: number[], podId: number) { const query = { where: { id: { - $in: ids + [Sequelize.Op.in]: ids }, podId } diff --git a/server/models/request/request.ts b/server/models/request/request.ts index b4c0226fa..71118a947 100644 --- a/server/models/request/request.ts +++ b/server/models/request/request.ts @@ -88,7 +88,7 @@ listWithLimitAndRandom = function (limitPods: number, limitRequestsPerPod: numbe model: Request['sequelize'].models.Pod, where: { id: { - $in: podIds + [Sequelize.Op.in]: podIds } } } @@ -112,7 +112,7 @@ removeWithEmptyTo = function () { const query = { where: { id: { - $notIn: [ + [Sequelize.Op.notIn]: [ Sequelize.literal('SELECT "requestId" FROM "RequestToPods"') ] } -- cgit v1.2.3