1 Star 0 Fork 0

zlc1000/heima_back

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
router.js 888 Bytes
Copy Edit Raw Blame History
zlc1000 authored 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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/zlc1000/heima_back.git
git@gitee.com:zlc1000/heima_back.git
zlc1000
heima_back
heima_back
master

Search