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

Function getOptions

web/src/components/settings/OtherSetting.js:211–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

209 }
210 };
211 const getOptions = async () => {
212 const res = await API.get('/api/option/');
213 const { success, message, data } = res.data;
214 if (success) {
215 let newInputs = {};
216 data.forEach((item) => {
217 if (item.key in inputs) {
218 newInputs[item.key] = item.value;
219 }
220 });
221 setInputs(newInputs);
222 formAPISettingGeneral.current.setValues(newInputs);
223 formAPIPersonalization.current.setValues(newInputs);
224 } else {
225 showError(message);
226 }
227 };
228
229 useEffect(() => {
230 getOptions();

Callers 1

OtherSetting.jsFile · 0.70

Calls 1

showErrorFunction · 0.90

Tested by

no test coverage detected