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
+12 -4
View File
@@ -40,8 +40,10 @@ export default function SparkPlug() {
setIsLoading(true);
try {
// Simulate reading PDF with Gemini
const geminiKey = localStorage.getItem('GEMINI_API_KEY');
// Validate keys
const keys = await api.getUserKeys();
const geminiKey = keys.GEMINI_API_KEY;
if (!geminiKey) {
alert("Please configure your Gemini API Key in the Dashboard Settings first.");
setIsLoading(false);
@@ -69,7 +71,10 @@ export default function SparkPlug() {
setIsLoading(true);
try {
const nanoBananaKey = localStorage.getItem('NANO_BANANA_API_KEY');
// Validate keys
const keys = await api.getUserKeys();
const nanoBananaKey = keys.NANO_BANANA_API_KEY;
if (!nanoBananaKey) {
alert("Please configure your Nano Banana API Key in the Dashboard Settings first.");
setIsLoading(false);
@@ -102,7 +107,10 @@ export default function SparkPlug() {
setIsLoading(true);
try {
const meshyKey = localStorage.getItem('MESHY_API_KEY');
// Validate keys
const keys = await api.getUserKeys();
const meshyKey = keys.MESHY_API_KEY;
if (!meshyKey) {
alert("Please configure your Meshy API Key in the Dashboard Settings first.");
setIsLoading(false);