fix: comment forms submitting via POST instead of PUT

This commit is contained in:
Xylight authored and xylight committed 2025-09-17 00:27:11 +00:00
1 parent 50c0b83511
commit 46c47b5977
2 files changed
+11 -2

No files matched your search

@@ -26,6 +26,7 @@
required?: boolean
id?: string
label?: string
editing?: boolean
oncomment?: (comment: CommentResponse) => void
onconfirm?: (value: string) => void
oncancel?: (cancel: boolean) => void
@@ -41,6 +42,7 @@
value = $bindable(''),
actions = true,
preview: previewAction = true,
editing = false,
oncancel,
oncomment,
...rest
@@ -51,7 +53,13 @@
let language: number | undefined = $state()
async function submit() {
if (!profile.current?.user || !profile.current?.jwt || value == '') return
if (
!profile.current?.user ||
!profile.current?.jwt ||
value == '' ||
editing
)
return
loading = true