
import * as asyncHandler from 'express-async-handler'

import * as leftBiz from '../biz/getData';
import * as jiQiRenBiz from '../biz/jiQiRen';
        
import * as cyszhglBiz from '../biz/cyszhgl';
        
import * as gfnyBiz from '../biz/gfny';
        
import * as sdt1hgfbBiz from '../biz/sdt1hgfb';

import * as yzdqxdnyzlBiz from '../biz/yzdqxdnyzl';
        
import * as hjszzlBiz from '../biz/hjszzl';
        
import * as nyjqrBiz from '../biz/nyjqr';
        
import * as jdaqglBiz from '../biz/jdaqgl';
        
import * as gbzscbgjdAqBiz from '../biz/gbzscbgjdAq';

import * as gbzscbgjdBqBiz from '../biz/gbzscbgjdBq';
        
export function setRouter(httpServer){
    /**竖屏 */
    httpServer.get('/left', asyncHandler(leftBiz.getLeft));
    httpServer.get('/data', asyncHandler(leftBiz.getData));
    httpServer.get('/right', asyncHandler(leftBiz.getRight));

    //机器人
    httpServer.get('/jiqiren/left', asyncHandler(jiQiRenBiz.getLeft));
    httpServer.get('/jiqiren/top', asyncHandler(jiQiRenBiz.getTop));
    httpServer.get('/jiqiren/right', asyncHandler(jiQiRenBiz.getRight));

    //======post
    httpServer.post('/weather', asyncHandler(leftBiz.getData));
    httpServer.get('/weather', asyncHandler(leftBiz.getData));

    httpServer.post('/cyszhgl', asyncHandler(cyszhglBiz.getData));
    httpServer.post('/cyszhgl/zzzl', asyncHandler(cyszhglBiz.zzzl));
        
    httpServer.post('/gfny', asyncHandler(gfnyBiz.getData));
        
    httpServer.post('/sdt1hgfb', asyncHandler(sdt1hgfbBiz.getData));

    httpServer.post('/yzdqxdnyzl', asyncHandler(yzdqxdnyzlBiz.getData));
        
    httpServer.post('/hjszzl', asyncHandler(hjszzlBiz.getData));
        
    httpServer.post('/nyjqr', asyncHandler(nyjqrBiz.getData));
        
    httpServer.post('/jdaqgl', asyncHandler(jdaqglBiz.getData));
        
    httpServer.post('/gbzscbgjdAq', asyncHandler(gbzscbgjdAqBiz.getData));

    httpServer.post('/gbzscbgjdBq', asyncHandler(gbzscbgjdBqBiz.getData));
            
    //======get
    
    httpServer.get('/cyszhgl', asyncHandler(cyszhglBiz.getData));
    httpServer.get('/cyszhgl/zzzl', asyncHandler(cyszhglBiz.zzzl));
        
    httpServer.get('/gfny', asyncHandler(gfnyBiz.getData));
        
    httpServer.get('/sdt1hgfb', asyncHandler(sdt1hgfbBiz.getData));

    httpServer.get('/yzdqxdnyzl', asyncHandler(yzdqxdnyzlBiz.getData));
        
    httpServer.get('/hjszzl', asyncHandler(hjszzlBiz.getData));
        
    httpServer.get('/nyjqr', asyncHandler(nyjqrBiz.getData));
        
    httpServer.get('/jdaqgl', asyncHandler(jdaqglBiz.getData));
        
    httpServer.get('/gbzscbgjdAq', asyncHandler(gbzscbgjdAqBiz.getData));

    httpServer.get('/gbzscbgjdBq', asyncHandler(gbzscbgjdBqBiz.getData));
    
        
}
    