aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/request-to-pod.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/request-to-pod.js')
-rw-r--r--server/models/request-to-pod.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/server/models/request-to-pod.js b/server/models/request-to-pod.js
deleted file mode 100644
index 0e01a842e..000000000
--- a/server/models/request-to-pod.js
+++ /dev/null
@@ -1,42 +0,0 @@
1'use strict'
2
3// ---------------------------------------------------------------------------
4
5module.exports = function (sequelize, DataTypes) {
6 const RequestToPod = sequelize.define('RequestToPod', {}, {
7 indexes: [
8 {
9 fields: [ 'requestId' ]
10 },
11 {
12 fields: [ 'podId' ]
13 },
14 {
15 fields: [ 'requestId', 'podId' ],
16 unique: true
17 }
18 ],
19 classMethods: {
20 removeByRequestIdsAndPod
21 }
22 })
23
24 return RequestToPod
25}
26
27// ---------------------------------------------------------------------------
28
29function removeByRequestIdsAndPod (requestsIds, podId, callback) {
30 if (!callback) callback = function () {}
31
32 const query = {
33 where: {
34 requestId: {
35 $in: requestsIds
36 },
37 podId: podId
38 }
39 }
40
41 this.destroy(query).asCallback(callback)
42}