Added category input component

This commit is contained in:
Alexis
2024-06-10 18:58:08 +02:00
parent e9ec2cb3ae
commit 17b9937c6a
11 changed files with 178 additions and 11 deletions

View File

@@ -0,0 +1,15 @@
import { serverSupabaseClient } from "#supabase/server";
import type { Category } from "~/models/Category";
export default defineEventHandler(async (event) => {
const client = await serverSupabaseClient(event)
const output = client
.from('calendar_event_categories')
.select(`
id,
name
`)
return output.returns<Category[]>()
})