mirror of
https://github.com/hpware/news-analyze.git
synced 2025-07-17 16:09:06 +00:00
Remove stuff including the chat function & TOS & Privacy Policy windows
& simplified the archive URL.
This commit is contained in:
parent
aa8fb3a2d2
commit
3a3c2c81e2
14 changed files with 20 additions and 573 deletions
11
server/api/download/archive.ts
Normal file
11
server/api/download/archive.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import sql from "~/server/components/postgres";
|
||||
export default defineEventHandler(async (event) => {
|
||||
const articles = await sql`
|
||||
SELECT * FROM news_articles;
|
||||
`;
|
||||
setHeaders(event, {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Disposition": `attachment; filename="news-articles-export-${new Date().toISOString().split("T")[0]}.json"`,
|
||||
});
|
||||
return articles;
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue