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)
}
