mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
16 lines
375 B
TypeScript
16 lines
375 B
TypeScript
export default defineEventHandler(async (event) => {
|
|
try {
|
|
const slug = getRouterParam(event, "slug");
|
|
const urlBuild = "/api/home/uuid_lt/" + slug;
|
|
const articleArray = [];
|
|
const req = await fetch(urlBuild);
|
|
const res = await req.text();
|
|
return res;
|
|
} catch (e) {
|
|
console.log(e);
|
|
return {
|
|
error: "SERVER_SIDE_ERROR",
|
|
};
|
|
}
|
|
});
|