ui: setting configuration (#1597)

This commit is contained in:
Lily Delalande
2025-03-10 16:52:38 -07:00
committed by GitHub
parent c0e719eaba
commit 6afaa8242b
4 changed files with 127 additions and 37 deletions
+5 -5
View File
@@ -71,13 +71,13 @@ export const ConfigProvider: React.FC<ConfigProviderProps> = ({ children }) => {
setConfig(response.data.config || {});
};
const upsert = async (key: string, value: unknown, isSecret?: boolean) => {
const upsert = async (key: string, value: unknown, isSecret: boolean = false) => {
console.log('trying to upsert', key, value, isSecret);
const query: UpsertConfigQuery = {
key,
value,
is_secret: isSecret || null,
key: key,
value: value,
is_secret: isSecret,
};
await upsertConfig({
body: query,
});