source: src/app/api/services/route.ts@ 057453c

main
Last change on this file since 057453c was 057453c, checked in by Naum Shapkarovski <naumshapkarovski@…>, 5 weeks ago

feat: implement employees

  • Property mode set to 100644
File size: 326 bytes
Line 
1import prisma from 'src/lib/prisma';
2import { NextResponse } from 'next/server';
3
4export async function GET() {
5 try {
6 const services = await prisma.service.findMany();
7 return NextResponse.json(services);
8 } catch (error) {
9 return NextResponse.json({ error: 'Failed to fetch services' }, { status: 500 });
10 }
11}
Note: See TracBrowser for help on using the repository browser.