updates to passport config, changes to routers
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
const router = require('express').Router();
|
||||
|
||||
module.exports = (app, passport) => {
|
||||
app.use('/api/auth', router);
|
||||
|
||||
router.post('/register', async (req, res, next) => {
|
||||
try {
|
||||
|
||||
} catch(e) {
|
||||
next(e);
|
||||
}
|
||||
})
|
||||
|
||||
router.post('/login', passport.authenticate('local'), async (req, res, next) => {
|
||||
try {
|
||||
|
||||
} catch(e) {
|
||||
next(e);
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/google', async (req, res, next) => {
|
||||
try {
|
||||
|
||||
} catch(e) {
|
||||
next(e);
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
const router = require('express').Router();
|
||||
|
||||
module.exports = (app) => {
|
||||
app.use('/api/order', router);
|
||||
|
||||
router.get('/', async (req, res, next) => {
|
||||
try {
|
||||
|
||||
} catch(e) {
|
||||
next(e);
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/:id', async (req, res, next) => {
|
||||
try {
|
||||
|
||||
} catch(e) {
|
||||
next(e);
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user