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:
+12
-4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user