venues and ui changes
This commit is contained in:
12
app/api/venues/fetch/route.ts
Normal file
12
app/api/venues/fetch/route.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { prisma } from '@/lib/prisma'
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const venues = await prisma.venue.findMany()
|
||||
return NextResponse.json(venues)
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch venues:', error)
|
||||
return new NextResponse('Failed to fetch venues', { status: 500 })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user