Test offices filtered out in signin form

parent 07acc222
Showing with 3 additions and 2 deletions
...@@ -101,9 +101,10 @@ module.exports = { ...@@ -101,9 +101,10 @@ module.exports = {
* ] * ]
*/ */
getAll: function (req, res) { getAll: function (req, res) {
Office.find().populate('admin').then(function (offices) { Office.find()
.populate('admin').then(function (offices) {
// return all offices filtering out personal ones // return all offices filtering out personal ones
res.ok(offices.filter(o => o.name !== 'no_office')); res.ok(offices.filter(o => o.name !== 'no_office' && o.name.search(' Test') == -1));
}) })
.catch(function () { .catch(function () {
res.serverError(); res.serverError();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment