You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.6 KiB
38 lines
1.6 KiB
'use strict';
|
|
|
|
const novaCloud = require('../controllers/novaCloud');
|
|
const multer = require('@koa/multer');
|
|
const os = require('os');
|
|
|
|
const upload = multer({ dest: os.tmpdir() });
|
|
|
|
module.exports = function (app, router, opts) {
|
|
const { middlewares: { auth } } = app;
|
|
|
|
// [获取播放器列表]
|
|
router.get('/novaCloud/players', novaCloud.getPlayerList, { content: '获取播放器列表', visible: true });
|
|
|
|
// [获取播放器详情]
|
|
router.get('/novaCloud/players/:playerId', novaCloud.getPlayerDetail, { content: '获取播放器详情', visible: true });
|
|
|
|
// [发送播放器命令]
|
|
router.post('/novaCloud/players/:playerId/command', novaCloud.sendPlayerCommand, { content: '发送播放器命令', visible: true });
|
|
|
|
// [屏幕开启]
|
|
router.post('/novaCloud/screen/open', novaCloud.openScreen, { content: '屏幕开启', visible: true });
|
|
|
|
// [屏幕关闭]
|
|
router.post('/novaCloud/screen/close', novaCloud.closeScreen, { content: '屏幕关闭', visible: true });
|
|
|
|
// [新增播放器]
|
|
router.post('/novaCloud/players', novaCloud.addPlayers, { content: '新增播放器', visible: true });
|
|
|
|
// [下发常规节目]
|
|
router.post('/novaCloud/program/normal', novaCloud.publishNormalProgram, { content: '下发常规节目', visible: true });
|
|
|
|
// [下发单页紧急插播节目]
|
|
router.post('/novaCloud/emergency-program/page', novaCloud.publishEmergencyProgramPage, { content: '下发单页紧急插播节目', visible: true });
|
|
|
|
// [语音识别并调用 FastGPT]
|
|
router.post('/novaCloud/voice/chat', upload.single('file'), novaCloud.voiceChat, { content: '语音识别并调用FastGPT', visible: true });
|
|
};
|
|
|