blob: aace3aa3ee1fe956b1be4609991eb3d17ca18ec7 [file] [log] [blame]
Matteo Scandolof6acdbe2016-12-13 10:29:37 -08001import {AppConfig} from '../config/app.config';
2export 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}