Fix issue where normal users are shown all apps

This commit is contained in:
Girish Ramakrishnan
2018-08-16 19:57:22 -07:00
parent dc3e3f5f4d
commit af58e56732

View File

@@ -58,7 +58,7 @@ function getApp(req, res, next) {
function getApps(req, res, next) {
assert.strictEqual(typeof req.user, 'object');
apps.getAll(function (error, allApps) {
apps.getAllByUser(req.user, function (error, allApps) {
if (error) return next(new HttpError(500, error));
allApps = allApps.map(apps.removeRestrictedFields);
@@ -574,4 +574,4 @@ function setOwner(req, res, next) {
next(new HttpSuccess(200, { }));
});
}
}