Move request to backend

This commit is contained in:
Cohee
2024-08-13 20:29:33 +03:00
parent ab42d6ff82
commit 1883095e39
5 changed files with 105 additions and 20 deletions

View File

@ -33,6 +33,7 @@ export const SECRET_KEYS = {
HUGGINGFACE: 'api_key_huggingface',
STABILITY: 'api_key_stability',
BLOCKENTROPY: 'api_key_blockentropy',
CUSTOM_OPENAI_TTS: 'api_key_custom_openai_tts',
};
const INPUT_MAP = {
@ -127,7 +128,7 @@ export async function writeSecret(key, value) {
const text = await response.text();
if (text == 'ok') {
secret_state[key] = true;
secret_state[key] = !!value;
updateSecretDisplay();
}
}