diff --git a/htdocs/js/atsebayt.js b/htdocs/js/atsebayt.js index 53b2554..024ae60 100644 --- a/htdocs/js/atsebayt.js +++ b/htdocs/js/atsebayt.js @@ -80,7 +80,7 @@ angular.module("AtsebaytApp") }) }) .factory("QuestProposal", function($resource) { - return $resource("/api/surveys/:surveyId/questions/:questId/proposals", { surveyId: '@id', questId: '@id' }, { + return $resource("/api/surveys/:surveyId/questions/:questId/proposals/:proposalId", { surveyId: '@id', questId: '@id', proposalId: '@id' }, { 'update': {method: 'PUT'}, }) }) @@ -612,7 +612,7 @@ angular.module("AtsebaytApp") $scope.saveProposal = function() { if (this.proposal.id) { - this.proposal.$update({ surveyId: $scope.survey.id, questId: $scope.question.id }); + this.proposal.$update({ surveyId: $scope.survey.id, questId: $scope.question.id, proposalId: this.proposal.id }); } else { this.proposal.$save({ surveyId: $scope.survey.id, questId: $scope.question.id }); } diff --git a/htdocs/views/survey.html b/htdocs/views/survey.html index dfb62bd..31bbc3b 100644 --- a/htdocs/views/survey.html +++ b/htdocs/views/survey.html @@ -105,8 +105,8 @@ - + Créez la question pour ajouter des propositions