From b8c99b057c048504e6f9dddc308bf2f669dd65c9 Mon Sep 17 00:00:00 2001 From: rem Date: Mon, 27 Nov 2023 11:03:53 +0100 Subject: [PATCH] rename json key from hash to password in modify password --- app/routes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes.php b/app/routes.php index f3cb3fe..9fbfe93 100644 --- a/app/routes.php +++ b/app/routes.php @@ -156,10 +156,10 @@ return function (App $app) { } $token = $req->getHeader('Authorization')[0]; - if (!Helpers::validJson((string) $req->getBody(), array("hash"))) { + if (!Helpers::validJson((string) $req->getBody(), array("password"))) { return $res->withStatus(400); } - $new_hash = $req->getParsedBody()['hash']; + $new_hash = $req->getParsedBody()['password']; $uuid = (new Token)->getUuidFromToken($token); $code = (new UserGateway)->updatePassword($uuid, $new_hash);