mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-02-01 03:18:05 +08:00
9 lines
372 B
TypeScript
9 lines
372 B
TypeScript
|
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`)
|
||
|
return await sendProxy(event, `https://smzdk.top/api/${id}/new`)
|
||
|
})
|