router.js
964 Bytes
/**
* 文章router
* @author: leo <qi.li@yoho.cn>
* @date: 23/06/2017
*/
const express = require('express');
const router = express.Router(); // eslint-disable-line
const auth = require('../../doraemon/middleware/auth');
const article = require('./controllers/article');
router.post('/like', article.like);
router.get('/list', article.list);
router.get('/y100list', article.y100List);
router.get('/y100randomlist', article.y100RandomList);
router.get('/y100detail', article.y100Detail);
router.get('/listNoImg', article.listNoImg);
router.get('/listNoUser', article.listNoUser);
router.post('/publish', auth, article.publish);
router.post('/saveScore', article.publishWithNoImg);
router.get('/listScore', article.listWithUser);
router.get('/querySingle', article.querySingle);
router.get('/queryByCodeName', article.queryByCodeName);
router.get('/queryById', article.queryById);
router.get('/queryByUserId', article.queryByUserId);
module.exports = router;