fix: upload image
This commit is contained in:
@@ -59,10 +59,11 @@ export default function CommentsPage() {
|
||||
}
|
||||
|
||||
async function confirmDelete() {
|
||||
if (!deleting || !query) return;
|
||||
if (!deleting || !query || deleting.id == null) return;
|
||||
setRemoving(true);
|
||||
try {
|
||||
await apiFetch(`/comments/${query.type}/${query.id}`, {
|
||||
// Delete targets the comment's own id: /comments/{type}/{id}/{commentId}
|
||||
await apiFetch(`/comments/${query.type}/${query.id}/${deleting.id}`, {
|
||||
method: "DELETE",
|
||||
});
|
||||
toast.success("نظر حذف شد.");
|
||||
|
||||
Reference in New Issue
Block a user