feat: ability to edit and delete comments

This commit is contained in:
2026-02-04 17:33:34 -08:00
parent 0a654f423a
commit e20be5f4e8
18 changed files with 922 additions and 41 deletions
@@ -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 });
}
}