generated from nhcarrigan/template
feat: ability to edit and delete comments
This commit is contained in:
@@ -86,4 +86,28 @@ export class CommentsService {
|
||||
deleteCommentFromManga(mangaId: string, commentId: string): Observable<{ success: boolean }> {
|
||||
return this.api.delete<{ success: boolean }>(`/manga/${mangaId}/comments/${commentId}`);
|
||||
}
|
||||
|
||||
updateCommentOnGame(gameId: string, commentId: string, content: string): Observable<Comment> {
|
||||
return this.api.put<Comment>(`/games/${gameId}/comments/${commentId}`, { content });
|
||||
}
|
||||
|
||||
updateCommentOnBook(bookId: string, commentId: string, content: string): Observable<Comment> {
|
||||
return this.api.put<Comment>(`/books/${bookId}/comments/${commentId}`, { content });
|
||||
}
|
||||
|
||||
updateCommentOnMusic(musicId: string, commentId: string, content: string): Observable<Comment> {
|
||||
return this.api.put<Comment>(`/music/${musicId}/comments/${commentId}`, { content });
|
||||
}
|
||||
|
||||
updateCommentOnArt(artId: string, commentId: string, content: string): Observable<Comment> {
|
||||
return this.api.put<Comment>(`/art/${artId}/comments/${commentId}`, { content });
|
||||
}
|
||||
|
||||
updateCommentOnShow(showId: string, commentId: string, content: string): Observable<Comment> {
|
||||
return this.api.put<Comment>(`/shows/${showId}/comments/${commentId}`, { content });
|
||||
}
|
||||
|
||||
updateCommentOnManga(mangaId: string, commentId: string, content: string): Observable<Comment> {
|
||||
return this.api.put<Comment>(`/manga/${mangaId}/comments/${commentId}`, { content });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user