1 Star 0 Fork 0

zlc1000/heima_back

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
router.js 888 Bytes
一键复制 编辑 原始数据 按行查看 历史
zlc1000 提交于 2020-05-18 18:22 . 添加token验证
const express = require('express')
const control = require('./control')
router = express.Router()
// 仅仅做用户在发请求的时候的匹配
router.get('/getHeroList', (req, res) => {
control.getHeroList(req, res)
})
router.post('/uploadFile', (req, res) => {
// res.send('uploadFile')
control.uploadFile(req, res)
})
router.post('/addHero', (req, res) => {
control.addHero(req, res)
})
router.post('/editHero', (req, res) => {
control.editHero(req, res)
})
router.get('/getHeroById', (req, res) => {
control.getHeroById(req, res)
})
router.get('/delHeroById', (req, res) => {
control.delHeroById(req, res)
})
router.get('/login', (req, res) => {
console.log('/login')
control.login(req, res)
})
// 登录验证 post /login userName password
router.post('/login', (req, res) => {
control.doLogin(req, res)
})
module.exports = router
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/zlc1000/heima_back.git
[email protected]:zlc1000/heima_back.git
zlc1000
heima_back
heima_back
master

搜索帮助