Skip to content

Commit

Permalink
Merge pull request #31 from SpaghettiDB/cont-team
Browse files Browse the repository at this point in the history
Edit log in
  • Loading branch information
Mohamed-khattab authored Jun 28, 2024
2 parents ac3f88f + f732d7a commit b081766
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions requests.rest
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ POST http://localhost:3000/login
Content-Type: application/json

{
"email": "amr11@g.com",
"email": "reem@gmail.com",
"password": "1234"
}

Expand Down Expand Up @@ -105,7 +105,7 @@ POST http://localhost:3000/team
Content-Type: application/json

{
"teamName": "t"
"teamName": "<3"
}

###
Expand All @@ -126,7 +126,7 @@ PUT http://localhost:3000/team/code
Content-Type: application/json

{
"teamId": 5
"teamId": 195
}

//2f353502
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/userController.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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` });
Expand Down

0 comments on commit b081766

Please sign in to comment.