Update api requests
This commit is contained in:
25
web/controllers/reimport.js
Normal file
25
web/controllers/reimport.js
Normal file
@@ -0,0 +1,25 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
angular
|
||||
.module('app')
|
||||
.controller('ReImportCtrl', ReImportCtrl);
|
||||
|
||||
TestHelloCtrl.$inject = ['$scope', 'smartRequest', '$location', 'Notification'];
|
||||
function TestHelloCtrl($scope, smartRequest, $location, Notification) {
|
||||
$scope.orders = [];
|
||||
$scope.total = [];
|
||||
|
||||
$scope.getOrders = function () {
|
||||
smartRequest.get('v1/hello?start_date=' + encodeURIComponent($scope.start_date) + '&end_date=' + encodeURIComponent($scope.end_date), function (data) {
|
||||
$scope.orders = data.orders;
|
||||
$scope.total = data.total;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.update = function () {
|
||||
$scope.getOrders();
|
||||
};
|
||||
|
||||
$scope.update();
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user