router.js
1.41 KB
/**
* 文章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');
const y100 = require('./controllers/y100');
router.post('/like', article.like); // 点赞
router.get('/list', article.list); // 文章列表
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);
router.get('/y100/list', y100.y100List); // y100图列表
router.get('/y100/detail', y100.y100Detail); // y100图详情
router.get('/y100/randomlist', y100.y100RandomList); // y100结果页随机列表
router.post('/y100/deviceScan', y100.y100DeviceScan); // y100扫描大屏接口-大屏
router.post('/y100/devicePost', y100.y100DevicePost); // y100完成游戏接口-大屏
router.get('/y100/deviceCheck', y100.checkDeviceStatus); // y100大屏检查状态接口-大屏
module.exports = router;