From f732d7a4e8144a54343b865cf3bf452c77740712 Mon Sep 17 00:00:00 2001 From: Salma-Mahmoudd Date: Fri, 28 Jun 2024 15:31:11 +0300 Subject: [PATCH] Edit log in --- requests.rest | 6 +++--- src/controllers/userController.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requests.rest b/requests.rest index 182138a..3014b5a 100644 --- a/requests.rest +++ b/requests.rest @@ -15,7 +15,7 @@ POST http://localhost:3000/login Content-Type: application/json { - "email": "amr11@g.com", + "email": "reem@gmail.com", "password": "1234" } @@ -93,7 +93,7 @@ POST http://localhost:3000/team Content-Type: application/json { - "teamName": "t" + "teamName": "<3" } ### @@ -114,7 +114,7 @@ PUT http://localhost:3000/team/code Content-Type: application/json { - "teamId": 5 + "teamId": 195 } //2f353502 diff --git a/src/controllers/userController.js b/src/controllers/userController.js index cae6eb4..264b301 100644 --- a/src/controllers/userController.js +++ b/src/controllers/userController.js @@ -41,7 +41,7 @@ export const registerController = async (req, res) => { name: username, password: hashedPassword, }); - await teamModel.createTeam(createdUser.id, createdUser.name); + await teamModel.createTeam(createdUser.name, createdUser.id); res .status(201) .json({ message: `User ${createdUser.email} created successfully` });