Add comment update functionality with UI integration

This commit is contained in:
2025-06-20 13:49:36 +08:00
parent 9e0e83ecd9
commit 46186e95df
5 changed files with 151 additions and 4 deletions

View File

@@ -934,6 +934,22 @@ class Network {
}
}
async updateComment(
commentID: number,
content: string,
): Promise<Response<any>> {
try {
const response = await axios.putForm(
`${this.apiBaseUrl}/comments/${commentID}`,
{ content },
);
return response.data;
} catch (e: any) {
console.error(e);
return { success: false, message: e.toString() };
}
}
async listComments(
resourceID: number,
page: number = 1,