blob: 2c10e10a73888d9466ebb4acbd57f799cc611d68 [file] [log] [blame]
Matteo Scandolo035c5932016-12-14 09:55:15 -08001import {AppConfig} from '../../config/app.config';
Matteo Scandolof6acdbe2016-12-13 10:29:37 -08002export class CoreRest {
3
4 /** @ngInject */
5 constructor(
6 private $http: angular.IHttpService,
7 private $q: angular.IQService
8 ) {
9 }
10
11 public query(): Promise<any> {
12 const d = this.$q.defer();
13 this.$http.get(`${AppConfig.apiEndpoint}/core/`)
14 .then(res => d.resolve(res.data))
15 .catch(d.reject);
16 return d.promise;
17 }
18}