src/app/www/js/functions.js
/**
 * Calls the API and requests a JSON with all the files inside ESP32's
 * filesystem. When it receives the response, it sets the new open options
 * with `setOpenOptions`.
 */
Calls the API and requests a JSON with all the files inside ESP32's
filesystem. When it receives the response, it sets the new open options
with `setOpenOptions`.
Calls the API and requests a JSON with all the files inside ESP32 ' s filesystem . When it receives the response it sets the new open options with ` setOpenOptions ` .
function updateScriptList() {
    const form = API.createRequestForm({
        Magic: MAGIC,
    });
    API.call(API.Resource.LIST, form)
       .then(json => {
           setOpenOptions(JSON.parse(json).dirFiles);
       })
       .catch(() => {});
}
function updateScriptList ( ) { const form = API . createRequestForm ( { Magic : MAGIC , } ) ; API . call ( API . Resource . LIST , form ) . then ( json => { setOpenOptions ( JSON . parse ( json ) . dirFiles ) ; } ) . catch ( ( ) => { } ) ; }
Calls the API and requests a JSON with all the files inside ESP32's
 filesystem.
Calls the API and requests a JSON with all the files inside ESP32 ' s filesystem .