feat: move API keys storage to Postgres database instead of localStorage
Build and Deploy / build-and-push (push) Failing after 21s

This commit is contained in:
AI Bot
2026-09-02 12:16:32 +05:30
parent abb818fecc
commit 658ca9e571
5 changed files with 102 additions and 21 deletions
+8 -1
View File
@@ -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 (