fixed transaction submission

This commit is contained in:
2016-04-11 15:01:28 +02:00
parent 6aaee428f0
commit 46e718bb85
2 changed files with 7 additions and 12 deletions
+1 -6
View File
@@ -58,18 +58,13 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
}
$scope.refreshAccount = function() {
console.log('BINGO!');
$scope.refreshList();
};
$scope.postTransaction = function() {
// via Resource (might be moved into a service)
var Transaction = $resource('/transactions');
var newTransaction = new Transaction({
"account" : $scope.account,
"account" : $scope.account._links.self.href,
"amount" : $scope.transaction.amount,
"date" : $scope.transaction.date,
"description" : $scope.transaction.description,