wip: Start work on submitting the cert
Some checks failed
Build / build (pull_request) Successful in 54s
Check formatting / check-formatting (pull_request) Failing after 17s

This commit is contained in:
Magnus Leßmann (@Mark.TwoFive) 2025-07-14 22:11:18 +02:00
parent 651c205656
commit 22eae92cba
Signed by: Mark.TwoFive
GPG key ID: 58204042FE30B10C
2 changed files with 48 additions and 45 deletions

View file

@ -1,10 +1,26 @@
<script setup lang="ts">
import CertificateEditor from "@/components/CertificateEditor.vue";
import { useMutation } from "@tanstack/vue-query";
import { fetchClient } from "@/plugins/client.ts";
const submitNewCert = useMutation({
mutationKey: ["submit-new-certificate"],
mutationFn: async (certificate) => {
fetchClient.POST("/api/certificates", {
body: certificate,
})
},
})
function submitCertificate({ certificate }) {
submitNewCert.mutate(certificate);
}
</script>
<template>
<v-container>
<CertificateEditor />
<CertificateEditor @submit="submitCertificate" :is-submitting="submitNewCert.isPending" />
</v-container>
</template>