mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Add archiving system & pushing news org.
Some checks are pending
Build and Push Beta Image / build-and-push (push) Waiting to run
Some checks are pending
Build and Push Beta Image / build-and-push (push) Waiting to run
This commit is contained in:
parent
38ce057937
commit
61f56a8c0a
2 changed files with 22 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
import sql from "~/server/components/postgres";
|
||||
import CheckKidUnfriendlyContent from "~/components/checks/checkKidUnfriendlyContent";
|
||||
import * as cheerio from "cheerio";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
// Caching
|
||||
|
||||
|
@ -91,9 +92,16 @@ export default defineEventHandler(async (event) => {
|
|||
});
|
||||
}
|
||||
});
|
||||
/*const pushNewsOrg = await sql`
|
||||
insert into
|
||||
`*/
|
||||
const pushNewsOrg = await sql`
|
||||
insert into lt_news_org (news_id, name, description)
|
||||
values (${uuidv4()}, ${newsOrgName}, ${description})
|
||||
`;
|
||||
console.log(pushNewsOrg);
|
||||
/**
|
||||
* news_id text primary key,
|
||||
name text not null,
|
||||
description text
|
||||
*/
|
||||
cache[slug] = {
|
||||
slug: slug,
|
||||
title: newsOrgName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue