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 | |
---|
1 | import prisma from 'src/lib/prisma';
|
---|
2 | import { NextResponse } from 'next/server';
|
---|
3 |
|
---|
4 | export 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.