mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-15 01:06:32 -05:00
22 lines
469 B
JavaScript
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;
|
|
}
|
|
}]);
|