17 lines
383 B
TypeScript
17 lines
383 B
TypeScript
import { NextResponse } from 'next/server'
|
|
import { prisma } from '@/libs/prisma'
|
|
|
|
export async function GET() {
|
|
// @ts-ignore
|
|
const roofMaterialCategory = await prisma.MS_SUITABLE.findMany({
|
|
select: {
|
|
roof_material: true,
|
|
},
|
|
distinct: ['roof_material'],
|
|
orderBy: {
|
|
roof_material: 'asc',
|
|
},
|
|
})
|
|
return NextResponse.json(roofMaterialCategory)
|
|
}
|