Refactoring day3

This commit is contained in:
2020-08-24 21:59:37 +02:00
parent 3c0d0c63fb
commit 3674e4ce3c
9 changed files with 132 additions and 216 deletions

View File

@@ -4,14 +4,9 @@ import * as services from "../services/services.js";
var router = express.Router();
router.post("/", async (req, res) => {
await services
.fetchUser()
.then((response) => {
res.send(response);
})
.catch((e) => {
services.handleError(e, res);
});
await services.checkEmailTaken("jonasz@bankai.pl").catch((e) => {
services.handleError(e, res);
});
});
export default router;