{"size": 1040, "ext": "js", "max_stars_repo_path": "lib/sample-app/area-api.js", "max_stars_repo_name": "simplinx-ltd/sx-sequelize-acl", "max_stars_repo_stars_event_min_datetime": "2019-11-21T07:12:00.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-13T10:48:03.000Z", "max_issues_repo_path": "lib/sample-app/area-api.js", "max_issues_repo_name": "simplinx-ltd/sx-sequelize-acl", "max_issues_repo_issues_event_min_datetime": "2021-05-07T00:26:44.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-01T21:36:13.000Z", "max_forks_repo_path": "lib/sample-app/area-api.js", "max_forks_repo_name": "simplinx-ltd/sx-sequelize-acl", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 52.0, "max_line_length": 97, "alphanum_fraction": 0.6923076923}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express = require("express");
const sx_sequelize_api_1 = require("sx-sequelize-api");
const __1 = require("../");
const area_model_1 = require("./area-model");
function default_1(connection) {
    let router = express.Router();
    let DbModel = area_model_1.default;
    let modelApi = new sx_sequelize_api_1.ModelRestApi(DbModel, connection);
    router.get('/', __1.RestAuth.middleware('@auth', 'GET:All Area'), modelApi.getAll());
    router.get('/count', __1.RestAuth.middleware('@auth', 'GET:COUNT Area'), modelApi.count());
    router.get('/:id', __1.RestAuth.middleware('@auth', 'GET:ONE Area'), modelApi.getById());
    router.post('/', __1.RestAuth.middleware('area', 'CREATE Area'), modelApi.create());
    router.put('/:id', __1.RestAuth.middleware('area', 'UPDATE Area'), modelApi.updateById());
    router.delete('/:id', __1.RestAuth.middleware('area', 'DELETE Area'), modelApi.deleteById());
    return router;
}
exports.default = default_1;
