Skip to content

Commit

Permalink
make function for get kegiatan
Browse files Browse the repository at this point in the history
  • Loading branch information
alfazh123 committed Dec 21, 2023
1 parent 236c39b commit fbc502c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pages/api/addkegiatan/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { db } from '@/server/db'
import { NextApiRequest, NextApiResponse } from 'next'
import { NextResponse } from 'next/server'

export async function GET(req: NextApiRequest, res: NextApiResponse) {
const kegiatan = await db.kegiatanLab.findMany()
return NextResponse.json(kegiatan)
}

0 comments on commit fbc502c

Please sign in to comment.