29 lines
746 B
JavaScript
29 lines
746 B
JavaScript
const express = require("express");
|
|
const statisticsRouter = express.Router();
|
|
|
|
const statisticsController = require("../controllers/statisticsController");
|
|
|
|
// ! /statistics
|
|
// * GET - All Time, Watch Time
|
|
statisticsRouter.get("/watch-time", statisticsController.getAllTimeWatchTime);
|
|
|
|
// * GET - Yearly Watch Time
|
|
statisticsRouter.get(
|
|
"/watch-time/year/:year",
|
|
statisticsController.getYearlyWatchTime,
|
|
);
|
|
|
|
// * GET - Yearly Watch Count Grouped By Month
|
|
statisticsRouter.get(
|
|
"/watch-count/year/:year",
|
|
statisticsController.getYearlyWatchCountGroupByMonth,
|
|
);
|
|
|
|
// * GET - Watch Day Distribution (DAYOFWEEK)
|
|
statisticsRouter.get(
|
|
"/watch-weekday",
|
|
statisticsController.getWatchdayDistribution,
|
|
);
|
|
|
|
module.exports = statisticsRouter;
|