mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 07:41:02 +08:00
Fix
This commit is contained in:
parent
8032c3faae
commit
feb679c3ef
@ -1,6 +1,8 @@
|
||||
import sql from "~/server/components/postgres";
|
||||
const createSources = await sql``;
|
||||
|
||||
const createUsers = await sql`
|
||||
export default defineEventHandler(async (event) => {
|
||||
const createUsers = await sql`
|
||||
create table if not exists users (
|
||||
uuid text primary key,
|
||||
created_at timestamptz default current_timestamp,
|
||||
@ -12,7 +14,7 @@ const createUsers = await sql`
|
||||
);
|
||||
`;
|
||||
|
||||
const usersList = await sql`
|
||||
const usersList = await sql`
|
||||
create table if not exists usertokens (
|
||||
token text not null primary key,
|
||||
created_at timestamptz default current_timestamp,
|
||||
@ -23,7 +25,7 @@ const usersList = await sql`
|
||||
)
|
||||
`;
|
||||
|
||||
const createUserAiChatHistory = await sql`
|
||||
const createUserAiChatHistory = await sql`
|
||||
CREATE TABLE IF NOT EXISTS chat_history (
|
||||
id SERIAL PRIMARY KEY,
|
||||
uuid VARCHAR(255) NOT NULL,
|
||||
@ -32,9 +34,6 @@ CREATE TABLE IF NOT EXISTS chat_history (
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)`;
|
||||
|
||||
const createSources = await sql``;
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
return {
|
||||
createUsers: createUsers,
|
||||
usersList: usersList,
|
||||
|
Loading…
x
Reference in New Issue
Block a user