mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 21:14:23 +00:00
Commit broken code.
This commit is contained in:
parent
935a7f2737
commit
2d8628d0da
2 changed files with 15 additions and 0 deletions
15
server/api/home/lt/[slug].ts
Normal file
15
server/api/home/lt/[slug].ts
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
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",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
Loading…
Add table
Add a link
Reference in a new issue