fix: comment forms submitting via POST instead of PUT
This commit is contained in:
1 parent
50c0b83511
commit
46c47b5977
2 files changed
+10
-1
No files matched your search
@@ -15,3 +15,4 @@ yarn.lock
|
|||||||
|
|
||||||
playwright-report
|
playwright-report
|
||||||
test-results
|
test-results
|
||||||
|
.vscode
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
required?: boolean
|
required?: boolean
|
||||||
id?: string
|
id?: string
|
||||||
label?: string
|
label?: string
|
||||||
|
editing?: boolean
|
||||||
oncomment?: (comment: CommentResponse) => void
|
oncomment?: (comment: CommentResponse) => void
|
||||||
onconfirm?: (value: string) => void
|
onconfirm?: (value: string) => void
|
||||||
oncancel?: (cancel: boolean) => void
|
oncancel?: (cancel: boolean) => void
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
value = $bindable(''),
|
value = $bindable(''),
|
||||||
actions = true,
|
actions = true,
|
||||||
preview: previewAction = true,
|
preview: previewAction = true,
|
||||||
|
editing = false,
|
||||||
oncancel,
|
oncancel,
|
||||||
oncomment,
|
oncomment,
|
||||||
...rest
|
...rest
|
||||||
@@ -51,7 +53,13 @@
|
|||||||
let language: number | undefined = $state()
|
let language: number | undefined = $state()
|
||||||
|
|
||||||
async function submit() {
|
async function submit() {
|
||||||
if (!profile.current?.user || !profile.current?.jwt || value == '') return
|
if (
|
||||||
|
!profile.current?.user ||
|
||||||
|
!profile.current?.jwt ||
|
||||||
|
value == '' ||
|
||||||
|
editing
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
loading = true
|
loading = true
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user