aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/pods.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/pods.js')
-rw-r--r--server/models/pods.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/models/pods.js b/server/models/pods.js
index daeadeb07..9502d92e4 100644
--- a/server/models/pods.js
+++ b/server/models/pods.js
@@ -1,6 +1,7 @@
1'use strict' 1'use strict'
2 2
3const mongoose = require('mongoose') 3const mongoose = require('mongoose')
4const map = require('lodash/map')
4 5
5const constants = require('../initializers/constants') 6const constants = require('../initializers/constants')
6const logger = require('../helpers/logger') 7const logger = require('../helpers/logger')
@@ -76,7 +77,11 @@ function list (callback) {
76} 77}
77 78
78function listAllIds (callback) { 79function listAllIds (callback) {
79 return PodsDB.find({}, { _id: 1 }, callback) 80 return PodsDB.find({}, { _id: 1 }, function (err, pods) {
81 if (err) return callback(err)
82
83 return callback(null, map(pods, '_id'))
84 })
80} 85}
81 86
82function listAllUrls (callback) { 87function listAllUrls (callback) {