changed POST /reset to DELETE /config

This commit is contained in:
RaffaelW 2024-11-04 20:54:28 +01:00
parent 5620d966d1
commit c09dc17967
2 changed files with 3 additions and 3 deletions

View file

@ -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}`);

View file

@ -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();