mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-07-05 05:38:54 +00:00
changed POST /reset to DELETE /config
This commit is contained in:
parent
5620d966d1
commit
c09dc17967
2 changed files with 3 additions and 3 deletions
|
@ -15,8 +15,8 @@ form.addEventListener("reset", async (event) => {
|
|||
|
||||
async function reset() {
|
||||
try {
|
||||
const res = await fetch("/reset", {
|
||||
method: "POST",
|
||||
const res = await fetch("/config", {
|
||||
method: "DELETE",
|
||||
});
|
||||
if (!res.ok) {
|
||||
throw new Error(`Response status: ${res.status}`);
|
||||
|
|
|
@ -84,7 +84,7 @@ void setup()
|
|||
server.on("/config", HTTP_GET, [](AsyncWebServerRequest *request)
|
||||
{ onGetConfig(config, request); });
|
||||
|
||||
server.on("/reset", HTTP_POST, [](AsyncWebServerRequest *request)
|
||||
server.on("/config", HTTP_DELETE, [](AsyncWebServerRequest *request)
|
||||
{
|
||||
config.begin("dmx", false);
|
||||
config.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue