(req, res)
| 8 | }; |
| 9 | |
| 10 | const createUser = async (req, res) => { |
| 11 | const { username, password, email, fullname } = req.body; |
| 12 | const hashedPassword = hashPassword(password); |
| 13 | |
| 14 | const user = await userService.createUser({ |
| 15 | username, |
| 16 | hashedPassword, |
| 17 | email, |
| 18 | fullname, |
| 19 | }); |
| 20 | |
| 21 | res.status(201).json({ |
| 22 | status: "success", |
| 23 | user, |
| 24 | }); |
| 25 | }; |
| 26 | |
| 27 | const getUserById = async (req, res) => { |
| 28 | const { id } = req.params; |
nothing calls this directly
no test coverage detected