diff --git a/src/app/core/services/api.service.ts b/src/app/core/services/api.service.ts index bcd60206..ce894ab1 100644 --- a/src/app/core/services/api.service.ts +++ b/src/app/core/services/api.service.ts @@ -143,7 +143,7 @@ export class ApiService { public createComment(slug: string, comment: Comment | CommentDTO): Promise { try { - return this.axiosInstance.post(`${this.baseHref}/comments/poll/${slug}`, comment); + return this.axiosInstance.post(`${this.baseHref}/comment/poll/${slug}`, comment); } catch (error) { ApiService.handleError(error); } diff --git a/src/app/shared/components/comments/comments.component.ts b/src/app/shared/components/comments/comments.component.ts index 55cb90c7..312db7db 100644 --- a/src/app/shared/components/comments/comments.component.ts +++ b/src/app/shared/components/comments/comments.component.ts @@ -40,8 +40,8 @@ export class CommentsComponent { } addComment() { - this.api - .createComment(this.pollService._poll.getValue().custom_url, { + this.pollService + .addComment({ pseudo: this.storageService.vote_stack.pseudo, text: this.storageService.vote_stack.comment, })