Skip to content

Commit

Permalink
Fixed the persisting comments error
Browse files Browse the repository at this point in the history
  • Loading branch information
SteelBurgher committed May 11, 2015
1 parent b8142ab commit 2e7ffa5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/app/contribution/contribution.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ angular.module('familyThiefApp')
$scope.addComment = function(form) {
if(form.$valid) {
var comment = {
origDate: $scope.id,
contributionId: $scope.id,
commenter: $scope.user.username,
comment: $scope.newCommentText
text: $scope.newCommentText
};
$http.post('api/contributions/comments', comment)
.success(function(data, status) {
comment.comment = comment.text;
$scope.contribution.comments.push(comment);
});
}
Expand Down

0 comments on commit 2e7ffa5

Please sign in to comment.