diff options
Diffstat (limited to 'src/database.js')
-rw-r--r-- | src/database.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/database.js b/src/database.js index 740e89fa4..514a622dc 100644 --- a/src/database.js +++ b/src/database.js | |||
@@ -30,6 +30,15 @@ | |||
30 | 30 | ||
31 | var PodsDB = mongoose.model('pods', podsSchema) | 31 | var PodsDB = mongoose.model('pods', podsSchema) |
32 | 32 | ||
33 | // ----------- PoolRequests ----------- | ||
34 | var poolRequestsSchema = mongoose.Schema({ | ||
35 | type: String, | ||
36 | id: String, // Special id to find duplicates (video created we want to remove...) | ||
37 | request: mongoose.Schema.Types.Mixed | ||
38 | }) | ||
39 | |||
40 | var PoolRequestsDB = mongoose.model('poolRequests', poolRequestsSchema) | ||
41 | |||
33 | // ----------- Connection ----------- | 42 | // ----------- Connection ----------- |
34 | 43 | ||
35 | mongoose.connect('mongodb://' + host + ':' + port + '/' + dbname) | 44 | mongoose.connect('mongodb://' + host + ':' + port + '/' + dbname) |
@@ -45,6 +54,7 @@ | |||
45 | // ----------- Export ----------- | 54 | // ----------- Export ----------- |
46 | module.exports = { | 55 | module.exports = { |
47 | VideosDB: VideosDB, | 56 | VideosDB: VideosDB, |
48 | PodsDB: PodsDB | 57 | PodsDB: PodsDB, |
58 | PoolRequestsDB: PoolRequestsDB | ||
49 | } | 59 | } |
50 | })() | 60 | })() |