<commit_before>import * as express from "express";
import { IReviewController } from "../controllers/ReviewController";

/**
 * Review express Routes.
 * Defines our API routes.
 * @author <NAME> <<EMAIL>>
 */
export class ReviewRoutes {

    /** Review controller. */
    private readonly _controller: IReviewController;

    /** Express Router. */
    private readonly _router: express.Router;

    /**
     * Class constructor. Injects controller and router dependencies.
     * @param controller    Review controller.
     * @param router        A express router.
     */
    constructor(controller: IReviewController, router: express.Router) {
        this._controller = controller;
        this._router = router;
    }

    /**
     * Gets Review API routes.
     * @returns  the router.
     */
    public get routes(): express.Router {
        const router: express.Router = this._router;
        const controller: IReviewController = this._controller;

        router.get("/reviews/filter/user/:userlogin/stats/alltime", (req: express.Request, res: express.Response) => {
            controller.getAllTimeStatsByUser(req, res);
        });

        return router;
    }

}<commit_msg>added stats route by repository.<commit_after>import * as express from "express";
import { IReviewController } from "../controllers/ReviewController";

/**
 * Review express Routes.
 * Defines our API routes.
 * @author <NAME> <<EMAIL>>
 */
export class ReviewRoutes {

    /** Review controller. */
    private readonly _controller: IReviewController;

    /** Express Router. */
    private readonly _router: express.Router;

    /**
     * Class constructor. Injects controller and router dependencies.
     * @param controller    Review controller.
     * @param router        A express router.
     */
    constructor(controller: IReviewController, router: express.Router) {
        this._controller = controller;
        this._router = router;
    }

    /**
     * Gets Review API routes.
     * @returns  the router.
     */
    public get routes(): express.Router {
        const router: express.Router = this._router;
        const controller: IReviewController = this._controller;

        router.get("/reviews/filter/user/:userlogin/stats/alltime", (req: express.Request, res: express.Response) => {
            controller.getAllTimeStatsByUser(req, res);
        });

        router.get("/reviews/filter/repo/:owner/:repository/stats/alltime", (req: express.Request, res: express.Response) => {
            controller.getAllTimeStatsByRepository(req, res);
        });

        return router;
    }

}
{'fraction_non_alphanumeric': 0.11699271192942079, 'fraction_numerical': 0.0, 'mean_word_length': 2.6732394366197183, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5079485', 'n_tokens_mistral': 687, 'n_tokens_neox': 676, 'n_words': 183}