express-template/routes/admin.js

13 lines
355 B
JavaScript
Raw Permalink Normal View History

2021-06-19 09:55:58 +00:00
var express = require('express')
const dto = require('../middlewares/ValidateDto')
const { PostAdminMemberDto } = require('../dto/admin')
var router = express.Router()
router.post('/member', dto(PostAdminMemberDto,'body'),async function (req, res) {
console.log(req.body)
res.send({ message:'Add Admin Member Success' })
})
module.exports = router