mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 16:26:59 +00:00
use app router
This commit is contained in:
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)
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user