use app router
This commit is contained in:
parent
0efa1f9fb2
commit
35f202f573
2 changed files with 6 additions and 5 deletions
6
web/app/api/models/route.js
Normal file
6
web/app/api/models/route.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
import models from '../../../../models.json'
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
export async function GET(re) {
|
||||
return NextResponse.json(models)
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
import models from '../../../models.json'
|
||||
|
||||
export default async function handler(req, res) {
|
||||
return res.status(200).json(models)
|
||||
}
|
Loading…
Add table
Reference in a new issue