forked from tykayn/funky-framadate-front
create comment from comment form
This commit is contained in:
parent
5d25754c16
commit
eb1fffb628
@ -143,7 +143,7 @@ export class ApiService {
|
||||
|
||||
public createComment(slug: string, comment: Comment | CommentDTO): Promise<string> {
|
||||
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);
|
||||
}
|
||||
|
@ -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,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user