diff options
Diffstat (limited to 'server/models/pods.js')
-rw-r--r-- | server/models/pods.js | 7 |
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 | ||
3 | const mongoose = require('mongoose') | 3 | const mongoose = require('mongoose') |
4 | const map = require('lodash/map') | ||
4 | 5 | ||
5 | const constants = require('../initializers/constants') | 6 | const constants = require('../initializers/constants') |
6 | const logger = require('../helpers/logger') | 7 | const logger = require('../helpers/logger') |
@@ -76,7 +77,11 @@ function list (callback) { | |||
76 | } | 77 | } |
77 | 78 | ||
78 | function listAllIds (callback) { | 79 | function 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 | ||
82 | function listAllUrls (callback) { | 87 | function listAllUrls (callback) { |