mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Add a few more database tables & made the api pull from the database
when then article exists & not ddos line today, Also made a basic newsView with the api & the scraping script now scraps more stuff! :D
This commit is contained in:
parent
fe5e2d996e
commit
b62a3cda3d
6 changed files with 84 additions and 40 deletions
|
@ -38,13 +38,13 @@ CREATE TABLE IF NOT EXISTS chat_history (
|
|||
|
||||
const newsArticles = await sql`
|
||||
create table if not exists news_articles (
|
||||
uuid text primary key,
|
||||
title text not null,
|
||||
content text not null,
|
||||
news_org text not null,
|
||||
origin_link text not null,
|
||||
author text,
|
||||
related_uuid text not null
|
||||
uuid text primary key,
|
||||
title text not null,
|
||||
content text not null,
|
||||
news_org text not null,
|
||||
origin_link text not null,
|
||||
author text,
|
||||
related_uuid text not null
|
||||
)
|
||||
`;
|
||||
|
||||
|
@ -59,6 +59,16 @@ create table if not exists hot_news (
|
|||
)
|
||||
`;
|
||||
|
||||
const articlesLt = await sql`
|
||||
create table if not exists articles_lt (
|
||||
uuid text primary key,
|
||||
title text not null,
|
||||
content text not null,
|
||||
origin text not null,
|
||||
author text,
|
||||
)
|
||||
`;
|
||||
|
||||
console.log("Creation Complete");
|
||||
|
||||
await sql.end();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue