mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-24 13:26:13 +00:00
Clean the code via prettier.
This commit is contained in:
parent
57aa0aba18
commit
eaa9b15b2d
10 changed files with 177 additions and 165 deletions
|
@ -1,25 +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`;
|
||||
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",
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
// 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