Add delete comment functionality with confirmation dialog.

This commit is contained in:
2025-06-23 19:55:43 +08:00
parent 46186e95df
commit dcd23054b2
6 changed files with 145 additions and 1 deletions

View File

@@ -986,6 +986,18 @@ class Network {
}
}
async deleteComment(commentID: number): Promise<Response<void>> {
try {
const response = await axios.delete(
`${this.apiBaseUrl}/comments/${commentID}`,
);
return response.data;
} catch (e: any) {
console.error(e);
return { success: false, message: e.toString() };
}
}
async getServerConfig(): Promise<Response<ServerConfig>> {
try {
const response = await axios.get(`${this.apiBaseUrl}/config`);