mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
Fix SQL Errors.
This commit is contained in:
parent
a232d9bc2b
commit
d18f8c6234
@ -35,7 +35,7 @@ CREATE TABLE IF NOT EXISTS chat_history (
|
|||||||
const createUserOtherData = await sql`
|
const createUserOtherData = await sql`
|
||||||
create table if not exists user_other_data (
|
create table if not exists user_other_data (
|
||||||
user_id text primary key,
|
user_id text primary key,
|
||||||
user text not null unique,
|
username text not null unique,
|
||||||
groq_api_key text,
|
groq_api_key text,
|
||||||
starred_news JSON not null,
|
starred_news JSON not null,
|
||||||
translate_provider text,
|
translate_provider text,
|
||||||
|
@ -19,7 +19,7 @@ export async function checkIfUserHasCustomGroqKey(token?: string) {
|
|||||||
}
|
}
|
||||||
const fetchUserToken = await sql`
|
const fetchUserToken = await sql`
|
||||||
select groq_api_key from user_other_data
|
select groq_api_key from user_other_data
|
||||||
where user=${checkRealToken[0].username}`;
|
where username=${checkRealToken[0].username}`;
|
||||||
if (fetchUserToken.length === 0) {
|
if (fetchUserToken.length === 0) {
|
||||||
return {
|
return {
|
||||||
status: false,
|
status: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user