1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-15 01:06:32 -05:00
shimapan/app/public/services/StatSvc.js
2018-12-31 18:37:34 -05:00

22 lines
469 B
JavaScript

const angular = require('angular');
angular.module('StatSvc', []).service('StatService', ['$http', function($http) {
this.getWeek = async () => {
const res = await $http({
method: 'GET',
url: '/api/stats/week'
});
return res.data;
};
this.getAll = async () => {
const res = await $http({
method: 'GET',
url: '/api/stats/all'
});
return res.data;
}
}]);