We should not use JSON.stringify() but leave escaping to AJAX itself

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-10-12 18:04:30 +02:00
parent e4e2ffabff
commit d2701f7955
9 changed files with 25 additions and 21 deletions

View File

@@ -318,7 +318,8 @@ function setTOTPSecret(secret) {
$.ajax({
url: "/api/config",
type: "PATCH",
data: JSON.stringify({ config: { webserver: { api: { totp_secret: secret } } } }),
dataType: "json",
data: { config: { webserver: { api: { totp_secret: secret } } } },
contentType: "application/json",
})
.done(function () {