mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
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> {
|
public createComment(slug: string, comment: Comment | CommentDTO): Promise<string> {
|
||||||
try {
|
try {
|
||||||
return this.axiosInstance.post(`${this.baseHref}/comments/poll/${slug}`, comment);
|
return this.axiosInstance.post(`${this.baseHref}/comment/poll/${slug}`, comment);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ApiService.handleError(error);
|
ApiService.handleError(error);
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,8 @@ export class CommentsComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addComment() {
|
addComment() {
|
||||||
this.api
|
this.pollService
|
||||||
.createComment(this.pollService._poll.getValue().custom_url, {
|
.addComment({
|
||||||
pseudo: this.storageService.vote_stack.pseudo,
|
pseudo: this.storageService.vote_stack.pseudo,
|
||||||
text: this.storageService.vote_stack.comment,
|
text: this.storageService.vote_stack.comment,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user