From d46841c21f51ccf0fdd19b4b28f19d63dd18f109 Mon Sep 17 00:00:00 2001 From: Julya Shapaeva Date: Sat, 30 Nov 2024 14:54:07 +0300 Subject: [PATCH] Update paths to json files --- server/routers/dogsitters-finder/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/routers/dogsitters-finder/index.js b/server/routers/dogsitters-finder/index.js index afa0060..8cd7b63 100644 --- a/server/routers/dogsitters-finder/index.js +++ b/server/routers/dogsitters-finder/index.js @@ -10,13 +10,13 @@ router.post("/auth", (request, response) => { const {phoneNumber, password} = request.body; console.log(phoneNumber, password); if (phoneNumber === '89999999999') { - response.send(require("../json/auth/dogsitter.success.json")) + response.send(require("./json/auth/dogsitter.success.json")) } else if (phoneNumber === '89555555555') { - response.status(400).send(require("../json/auth/error.json")) + response.status(400).send(require("./json/auth/error.json")) } else { - response.send(require("../json/auth/owner.success.json")) + response.send(require("./json/auth/owner.success.json")) } }) @@ -24,13 +24,13 @@ router.post("/register", (request, response) => { const {firstName, secondName, phoneNumber, password, role} = request.body; console.log(phoneNumber, password, role); if (phoneNumber === '89283244141' || phoneNumber === '89872855893') { - response.status(400).send(require("../json/register/error.json")) + response.status(400).send(require("./json/register/error.json")) } else if (role === 'dogsitter') { - response.send(require("../json/register/dogsitter.success.json")) + response.send(require("./json/register/dogsitter.success.json")) } else { - response.send(require("../json/register/owner.success.json")) + response.send(require("./json/register/owner.success.json")) } })