Refactor API endpoints to use cached data and update Code of Conduct to Contributor Covenant

This commit is contained in:
yuanhau 2025-05-14 18:52:14 +08:00
parent 878ac4f1a6
commit 96b297f617
17 changed files with 207 additions and 31 deletions

View file

@ -1,27 +0,0 @@
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",
logo: "#",
url: "https://source1.com",
description: "Description for Source 1",
},
{
id: 2,
title: "Source 2",
logo: "#",
url: "https://source2.com",
description: "Description for Source 2",
},
],
};
});