MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / updateOption

Function updateOption

web/src/components/settings/OtherSetting.js:36–49  ·  view source on GitHub ↗
(key, value)

Source from the content-addressed store, hash-verified

34 });
35
36 const updateOption = async (key, value) => {
37 setLoading(true);
38 const res = await API.put('/api/option/', {
39 key,
40 value,
41 });
42 const { success, message } = res.data;
43 if (success) {
44 setInputs((inputs) => ({ ...inputs, [key]: value }));
45 } else {
46 showError(message);
47 }
48 setLoading(false);
49 };
50
51 const [loadingInput, setLoadingInput] = useState({
52 Notice: false,

Callers 6

submitNoticeFunction · 0.70
submitSystemNameFunction · 0.70
submitLogoFunction · 0.70
submitOptionFunction · 0.70
submitAboutFunction · 0.70
submitFooterFunction · 0.70

Calls 1

showErrorFunction · 0.90

Tested by

no test coverage detected