mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-21 01:01:30 +03:00
12 lines
352 B
JavaScript
12 lines
352 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
|
|
const { login, validate } = require('../controllers/auth');
|
|
const requireBody = require('../middleware/requireBody');
|
|
|
|
router.route('/').post(requireBody(['password', 'duration']), login);
|
|
|
|
router.route('/validate').post(requireBody(['token']), validate);
|
|
|
|
module.exports = router;
|