mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-07-05 13:48:53 +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() {
|
async function reset() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch("/reset", {
|
const res = await fetch("/config", {
|
||||||
method: "POST",
|
method: "DELETE",
|
||||||
});
|
});
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
throw new Error(`Response status: ${res.status}`);
|
throw new Error(`Response status: ${res.status}`);
|
||||||
|
|
|
@ -84,7 +84,7 @@ void setup()
|
||||||
server.on("/config", HTTP_GET, [](AsyncWebServerRequest *request)
|
server.on("/config", HTTP_GET, [](AsyncWebServerRequest *request)
|
||||||
{ onGetConfig(config, request); });
|
{ onGetConfig(config, request); });
|
||||||
|
|
||||||
server.on("/reset", HTTP_POST, [](AsyncWebServerRequest *request)
|
server.on("/config", HTTP_DELETE, [](AsyncWebServerRequest *request)
|
||||||
{
|
{
|
||||||
config.begin("dmx", false);
|
config.begin("dmx", false);
|
||||||
config.clear();
|
config.clear();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue