feat: move API keys storage to Postgres database instead of localStorage
Build and Deploy / build-and-push (push) Failing after 21s
Build and Deploy / build-and-push (push) Failing after 21s
This commit is contained in:
+8
-1
@@ -25,7 +25,8 @@ const initDB = async () => {
|
||||
role TEXT DEFAULT 'user',
|
||||
api_credits INTEGER DEFAULT 10,
|
||||
storage_limit_mb INTEGER DEFAULT 500,
|
||||
is_active BOOLEAN DEFAULT false
|
||||
is_active BOOLEAN DEFAULT false,
|
||||
api_keys TEXT
|
||||
)
|
||||
`);
|
||||
|
||||
@@ -36,6 +37,12 @@ const initDB = async () => {
|
||||
} catch (err) {
|
||||
// Ignore if it already exists
|
||||
}
|
||||
|
||||
try {
|
||||
await client.query(`ALTER TABLE profiles ADD COLUMN api_keys TEXT`);
|
||||
} catch (err) {
|
||||
// Ignore if it already exists
|
||||
}
|
||||
|
||||
await client.query(`
|
||||
CREATE TABLE IF NOT EXISTS projects (
|
||||
|
||||
Reference in New Issue
Block a user