chore(api): 删除未使用的健康检查端点
This commit is contained in:
@@ -1,27 +0,0 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
|
||||||
import { name, version } from '@/../package.json'
|
|
||||||
|
|
||||||
const createHealthResponse = (): Response =>
|
|
||||||
Response.json(
|
|
||||||
{
|
|
||||||
status: 'ok',
|
|
||||||
service: name,
|
|
||||||
version,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
status: 200,
|
|
||||||
headers: {
|
|
||||||
'cache-control': 'no-store',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
export const Route = createFileRoute('/api/health')({
|
|
||||||
server: {
|
|
||||||
handlers: {
|
|
||||||
GET: async () => createHealthResponse(),
|
|
||||||
HEAD: async () => new Response(null, { status: 200 }),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user