You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function will be called from within your server to get an existing preset or create/update a preset.
presetHandler takes up to three arguments.
The first argument is a string representing the request type: 'GET' or 'PUT'.
The second argument is the array index of the presets array.
For 'PUT' requests, a third argument, newPresetArray will also be passed in, representing the new drum preset array to save at that index.
presetHandler should return an array. This array will have one or two elements depending on how it is called. If presetHandler is called with an invalid index, it should return an array with 404 as the first element, meaning that that array index is Not Found. If index is valid, the first element of the return array should be 200, meaning the request was OK.
If presetHandler is called a method that is not 'GET' or 'PUT', it should return an array with 400 as the first element, meaning that it was a Bad Request.
If the index was valid, presetHandler should also return a second element in the array. for 'GET' requests, that element should be the preset array at that array index. For 'PUT' requests, it should save the newPresetArray to that index and then also return it as the second element.
The text was updated successfully, but these errors were encountered:
This function will be called from within your server to get an existing preset or create/update a preset.
presetHandler takes up to three arguments.
If the index was valid, presetHandler should also return a second element in the array. for 'GET' requests, that element should be the preset array at that array index. For 'PUT' requests, it should save the newPresetArray to that index and then also return it as the second element.
The text was updated successfully, but these errors were encountered: