wip: Create some frontend components to test API generation

This commit is contained in:
Magnus Leßmann (@Mark.TwoFive) 2025-06-21 14:06:44 +02:00
parent 532d37ce81
commit e91bf96e74
Signed by: Mark.TwoFive
GPG key ID: 58204042FE30B10C
10 changed files with 138 additions and 6 deletions

View file

@ -0,0 +1,34 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { fetchClient, type Schemas } from "@/plugins/client.ts";
import { useRoute } from "vue-router";
const route = useRoute();
const certificate = ref<Schemas["Certificate"] | null>(null);
async function getCertificate() {
const fingerprint = route.params.fingerprint as string;
const response = await fetchClient.GET("/api/certificates/{fingerprint}", {
params: {
path: {
fingerprint,
}
}
});
certificate.value = response.data ?? null;
}
onMounted(() => {
getCertificate()
});
</script>
<template>
<main>
<form v-if="certificate">
<h2>Details des Zertifikats: {{ certificate.fingerprint }}</h2>
</form>
</main>
</template>