Add Client.getApp that uses REST API
This commit is contained in:
@@ -735,6 +735,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
|
||||
};
|
||||
|
||||
Client.prototype.getApp = function (appId, callback) {
|
||||
get('/api/v1/apps/' + appId).success(function (data, status) {
|
||||
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
|
||||
callback(null, data);
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.getCachedApp = function (appId, callback) {
|
||||
var appFound = null;
|
||||
this._installedApps.some(function (app) {
|
||||
if (app.id === appId) {
|
||||
|
||||
Reference in New Issue
Block a user