mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
feat: enhance localization by adding new app strings and descriptions; implement sources window for news sources display
This commit is contained in:
parent
3f60015b82
commit
26d3998a70
6 changed files with 86 additions and 9 deletions
25
server/api/getData/fetchSources.ts
Normal file
25
server/api/getData/fetchSources.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import sql from "~/server/components/postgres";
|
||||
export default defineEventHandler(async (event) => {
|
||||
const body = await readBody(event);
|
||||
const query = getQuery(event);
|
||||
/*const sources = await sql`SELECT * FROM sources`;
|
||||
return sources;*/
|
||||
// Fake data
|
||||
return {
|
||||
status: "ok",
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
title: "Source 1",
|
||||
url: "https://source1.com",
|
||||
description: "Description for Source 1",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "Source 2",
|
||||
url: "https://source2.com",
|
||||
description: "Description for Source 2",
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue