From ec5ecd504c26927b3b5a9c7195e67cbc38f8e9c2 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Wed, 27 Dec 2023 14:47:29 +0000 Subject: [PATCH] feat: adjust any form that takes teh suers username and pass so its in the auth field. Closes #8 --- src/modify.html | 2 +- src/password.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modify.html b/src/modify.html index 7a7220a..6bf131a 100644 --- a/src/modify.html +++ b/src/modify.html @@ -62,7 +62,7 @@ const user = formData.get("user"); const pass = formData.get("pass"); const value = formData.get("value"); - const object = {user: user, pass: pass, field: field, value: value} + const object = {auth: {user: user, pass: pass}, field: field, value: value} fetch('https://api.account.skynet.ie/ldap/update', { method: 'POST', body: JSON.stringify(object), diff --git a/src/password.html b/src/password.html index 9b53099..9a7e389 100644 --- a/src/password.html +++ b/src/password.html @@ -52,7 +52,7 @@ const pass = formData.get("pass"); const newPW = formData.get("newPW"); if (newPW === formData.get("newPWConfirm")) { - const object = {user: user, pass: pass, field: "userPassword", value: newPW} + const object = {auth: {user: user, pass: pass}, field: "userPassword", value: newPW} fetch('https://api.account.skynet.ie/ldap/update', { method: 'POST', body: JSON.stringify(object),