Added category input component
This commit is contained in:
15
server/api/calendars/categories/query.get.ts
Normal file
15
server/api/calendars/categories/query.get.ts
Normal 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[]>()
|
||||
})
|
||||
Reference in New Issue
Block a user