diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-26 16:59:02 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-26 16:59:02 +0200 |
commit | c2962505115563ad1510e8116f3b362887cac71f (patch) | |
tree | 530d930e48f45aad27b429621542a6bca1dc1b60 /server/models/request | |
parent | a265f7f30fe5f25e742c99c6d43e79dfd46bf2a9 (diff) | |
download | PeerTube-c2962505115563ad1510e8116f3b362887cac71f.tar.gz PeerTube-c2962505115563ad1510e8116f3b362887cac71f.tar.zst PeerTube-c2962505115563ad1510e8116f3b362887cac71f.zip |
Remove sequelize deprecated operators
Diffstat (limited to 'server/models/request')
-rw-r--r-- | server/models/request/request-to-pod.ts | 2 | ||||
-rw-r--r-- | server/models/request/request-video-event.ts | 4 | ||||
-rw-r--r-- | server/models/request/request-video-qadu.ts | 4 | ||||
-rw-r--r-- | server/models/request/request.ts | 4 |
4 files changed, 7 insertions, 7 deletions
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) { | |||
41 | const query = { | 41 | const query = { |
42 | where: { | 42 | where: { |
43 | requestId: { | 43 | requestId: { |
44 | $in: requestsIds | 44 | [Sequelize.Op.in]: requestsIds |
45 | }, | 45 | }, |
46 | podId: podId | 46 | podId: podId |
47 | } | 47 | } |
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 | |||
111 | model: RequestVideoEvent['sequelize'].models.Pod, | 111 | model: RequestVideoEvent['sequelize'].models.Pod, |
112 | where: { | 112 | where: { |
113 | id: { | 113 | id: { |
114 | $in: podIds | 114 | [Sequelize.Op.in]: podIds |
115 | } | 115 | } |
116 | } | 116 | } |
117 | } | 117 | } |
@@ -135,7 +135,7 @@ removeByRequestIdsAndPod = function (ids: number[], podId: number) { | |||
135 | const query = { | 135 | const query = { |
136 | where: { | 136 | where: { |
137 | id: { | 137 | id: { |
138 | $in: ids | 138 | [Sequelize.Op.in]: ids |
139 | } | 139 | } |
140 | }, | 140 | }, |
141 | include: [ | 141 | 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 | |||
101 | model: RequestVideoQadu['sequelize'].models.Pod, | 101 | model: RequestVideoQadu['sequelize'].models.Pod, |
102 | where: { | 102 | where: { |
103 | id: { | 103 | id: { |
104 | $in: podIds | 104 | [Sequelize.Op.in]: podIds |
105 | } | 105 | } |
106 | } | 106 | } |
107 | }, | 107 | }, |
@@ -122,7 +122,7 @@ removeByRequestIdsAndPod = function (ids: number[], podId: number) { | |||
122 | const query = { | 122 | const query = { |
123 | where: { | 123 | where: { |
124 | id: { | 124 | id: { |
125 | $in: ids | 125 | [Sequelize.Op.in]: ids |
126 | }, | 126 | }, |
127 | podId | 127 | podId |
128 | } | 128 | } |
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 | |||
88 | model: Request['sequelize'].models.Pod, | 88 | model: Request['sequelize'].models.Pod, |
89 | where: { | 89 | where: { |
90 | id: { | 90 | id: { |
91 | $in: podIds | 91 | [Sequelize.Op.in]: podIds |
92 | } | 92 | } |
93 | } | 93 | } |
94 | } | 94 | } |
@@ -112,7 +112,7 @@ removeWithEmptyTo = function () { | |||
112 | const query = { | 112 | const query = { |
113 | where: { | 113 | where: { |
114 | id: { | 114 | id: { |
115 | $notIn: [ | 115 | [Sequelize.Op.notIn]: [ |
116 | Sequelize.literal('SELECT "requestId" FROM "RequestToPods"') | 116 | Sequelize.literal('SELECT "requestId" FROM "RequestToPods"') |
117 | ] | 117 | ] |
118 | } | 118 | } |