Call postProcess in getApps

This commit is contained in:
Girish Ramakrishnan
2020-06-08 17:20:18 -07:00
parent 5440a3b62b
commit 94b6f5bffd
+8 -2
View File
@@ -1071,11 +1071,18 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.getApps = function (callback) {
var that = this;
get('/api/v1/apps', null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.apps);
var apps = data.apps;
for (var i = 0; i < apps.length; i++) {
that._appPostProcess(apps[i]); // this will also set the correct iconUrl
}
callback(null, apps);
});
};
@@ -1805,7 +1812,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
var canManageApp = that._userInfo.isAtLeastAdmin;
if (!canManageApp) {
that._appPostProcess(app); // this will also set the correct iconUrl
that._updateAppCache(app);
return iteratorCallback();
}