import { apiHandler, usersRepo } from '../../../helpers/api';

export default apiHandler({
    post: register
});

async function register(req, res) {
     try {
         await usersRepo.create(req.body);
         return res.status(200).json({});
     } catch (error) {
         return res.status(400).json({ error: error.message });
     }
}
