Skip to content

Commit

Permalink
Merge pull request #102 from Arquisoft/hot-fix-registration
Browse files Browse the repository at this point in the history
Solved registration bug
  • Loading branch information
uo287841 authored Apr 7, 2024
2 parents 4387e4f + 83ba07d commit 2717f33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion users/userservice/user-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ app.post('/adduser', async (req, res) => {
});

await newUser.save();
res.json(newUser);
res.status(200).json(newUser);
} catch (error) {
res.status(400).json({ error: error.message });
}});
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/AddUser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const AddUser = () => {
const [cpassword, setcPassword] = useState('');
const [error, setError] = useState('');
const [openSnackbar, setOpenSnackbar] = useState(false);
const { navigate } = useNavigate();
const navigate = useNavigate();

const addUser = async () => {
try {
Expand Down

0 comments on commit 2717f33

Please sign in to comment.