backend/src/controllers/auth.controllers.js
Fred Boniface 14e0a93d86 Add initial registration functions
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 21:28:46 +01:00

14 lines
287 B
JavaScript

const auth = require('../services/auth.services');
async function register(req, res, next){
try {
res.json(await auth.addUser(req.body))
} catch (err) {
console.error(`Controller Error`, err.message);
next(err);
}
}
module.exports = {
register
}