9 lines
368 B
TypeScript
Raw Normal View History

2024-09-29 20:57:24 +08:00
import { defineEventHandler, getQuery, getRouterParam, sendProxy } from "h3"
export default defineEventHandler(async (event) => {
const id = getRouterParam(event, "id")
const { latest } = getQuery(event)
if (latest !== undefined) return await sendProxy(event, `https://smzdk.top/api/${id}/new`)
2024-09-30 01:50:58 +08:00
return await sendProxy(event, `https://smzdk.top/api/${id}`)
2024-09-29 20:57:24 +08:00
})