Fix ESLint errors

This commit is contained in:
Jan Tuomi
2017-02-01 17:27:00 +02:00
parent 95c016ce11
commit 558d624076
4 changed files with 315 additions and 55 deletions
+6 -7
View File
@@ -27,7 +27,7 @@ function memberDataEditor(returnpath) {
});
$scope.send = function() {
$http.put("/members/api/member/" + $scope.member.id, $scope.member).then( function(data){
$http.put("/members/api/member/" + $scope.member.id, $scope.member).then(function(response){
notySuccess("Jäsentiedot tallennettu");
$location.path(returnpath);
});
@@ -62,7 +62,7 @@ app.directive('ngConfirmClick', [ function() { return {
// controllers
app.controller("getController", function($scope, $document, $http, $window, $location){
app.controller("getController", function($scope, $document, $http){
/* List of all members that are fetched from the database */
$scope.members = [];
@@ -98,9 +98,8 @@ app.controller("getController", function($scope, $document, $http, $window, $loc
/* Update the payment date of a single member to the current time and send
* the member to the database */
$scope.updatePayment= function(id){
$http.put("/members/api/member/"+id, { paid: moment().format("YYYY-MM-DD kk:mm:ss") }).then(function(resp) {
$http.put("/members/api/member/"+id, { paid: moment().format("YYYY-MM-DD kk:mm:ss") }).then(function(response) {
$scope.updateMember(id);
notySuccess("Maksupäivämäärä päivitetty.");
});
};
@@ -213,7 +212,7 @@ app.controller("getController", function($scope, $document, $http, $window, $loc
app.controller("postController", function($scope, $http, $location) {
$scope.member = {};
$scope.send = function() {
$http.post("/members/api/member/", $scope.member).then(function(data){
$http.post("/members/api/member/", $scope.member).then(function(response){
notySuccess("Jäsen lisätty!");
$location.path("/list");
});
@@ -221,7 +220,7 @@ app.controller("postController", function($scope, $http, $location) {
});
/* Controller for application page */
app.controller("applController", function($scope, $http, $route, $routeParams, $window, $location){
app.controller("applController", function($scope, $http){
$scope.applUpdateAll = function() {
$http.get("/members/api/requests").then(function(response){
$scope.applications = response.data;
@@ -236,7 +235,7 @@ app.controller("applController", function($scope, $http, $route, $routeParams, $
$scope.sendAppl = function(id) {
$http.post("/members/api/request/" + id).then(
function(response) {
notySuccess("Hakemus hyväksytty");
notySuccess("Hakemus hyväksytty");
$scope.applUpdateAll();
},
function(response) {