Fix send cancel request
linter / quality (push) Successful in 5m1s
tests / ci (8.3) (push) Successful in 4m28s

This commit is contained in:
2026-09-18 23:58:51 +02:00
parent 9389aef632
commit ae676343a5
+11 -9
View File
@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { router, useForm } from '@inertiajs/vue3'; import { useForm } from '@inertiajs/vue3';
import { ref, watch } from 'vue'; import { ref, watch } from 'vue';
import { import {
Form, Form,
@@ -190,15 +190,17 @@ const emit = defineEmits(['update:selectedDataset', 'update:trainingId']);
async function cancelTraining() { async function cancelTraining() {
form.cancel(); form.cancel();
router.post( await fetch(cancel().url, {
cancel().url, method: 'POST',
{ headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
credentials: 'same-origin',
body: JSON.stringify({
training_id: trainingId.value, training_id: trainingId.value,
}, }),
{ });
preserveScroll: true,
},
);
} }
watch(selectedDatasetCopy, (newValue) => { watch(selectedDatasetCopy, (newValue) => {