import * as asyncHandler from 'express-async-handler';
import * as szgcBiz from '../../biz/getData';

export function setRightRoutes(httpServer) {
    httpServer.get('/szgc/getdata/getEventCountByYear', asyncHandler((req, res) => szgcBiz.getData(req, res, 'getEventCountByYear')));
    httpServer.get('/szgc/getdata/getEventTimeDistribution', asyncHandler((req, res) => szgcBiz.getData(req, res, 'getEventTimeDistribution')));
    httpServer.get('/szgc/getdata/getEventMonthDistribution', asyncHandler((req, res) => szgcBiz.getData(req, res, 'getEventMonthDistribution')));
    httpServer.get('/szgc/getdata/getEventCategoryCount', asyncHandler((req, res) => szgcBiz.getData(req, res, 'getEventCategoryCount')));
    httpServer.get('/szgc/getdata/getEventSubCategoryCount', asyncHandler((req, res) => szgcBiz.getData(req, res, 'getEventSubCategoryCount')));
    httpServer.get('/szgc/getdata/getEventSourceCount', asyncHandler((req, res) => szgcBiz.getData(req, res, 'getEventSourceCount')));
    httpServer.get('/szgc/getdata/getGridEventCount', asyncHandler((req, res) => szgcBiz.getData(req, res, 'getGridEventCount')));
    httpServer.get('/szgc/getdata/getEventProcessingTime', asyncHandler((req, res) => szgcBiz.getData(req, res, 'getEventProcessingTime')));
}
