@golemio/waze-ccp 1.1.14-dev.1288392121 → 1.1.14-dev.1311982372
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
2
|
+
import { CacheHeaderMiddleware } from "@golemio/core/dist/output-gateway/CacheHeaderMiddleware";
|
|
2
3
|
export declare class PotHolesRouter extends AbstractRouter {
|
|
3
4
|
private controller;
|
|
5
|
+
protected cacheHeaderMiddleware: CacheHeaderMiddleware;
|
|
4
6
|
constructor();
|
|
5
|
-
protected initRoutes(
|
|
7
|
+
protected initRoutes(): void;
|
|
6
8
|
}
|
|
7
9
|
declare const v1PotHolesRouter: AbstractRouter;
|
|
8
10
|
export { v1PotHolesRouter };
|
|
@@ -10,21 +10,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.v1PotHolesRouter = exports.PotHolesRouter = void 0;
|
|
13
|
-
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
14
|
-
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
15
|
-
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
16
|
-
const redis_1 = require("@golemio/core/dist/output-gateway/redis");
|
|
17
13
|
const Di_1 = require("../ioc/Di");
|
|
18
14
|
const ModuleContainerToken_1 = require("../ioc/ModuleContainerToken");
|
|
15
|
+
const AbstractRouter_1 = require("@golemio/core/dist/helpers/routing/AbstractRouter");
|
|
16
|
+
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
17
|
+
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
18
|
+
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
19
19
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
20
20
|
let PotHolesRouter = exports.PotHolesRouter = class PotHolesRouter extends AbstractRouter_1.AbstractRouter {
|
|
21
21
|
constructor() {
|
|
22
22
|
super("v1", "potholes");
|
|
23
23
|
this.controller = Di_1.PotHolesContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.PotholesController);
|
|
24
|
+
this.cacheHeaderMiddleware = Di_1.PotHolesContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
|
|
24
25
|
this.initRoutes();
|
|
25
26
|
}
|
|
26
|
-
initRoutes(
|
|
27
|
-
this.router.get("/data", [(0, express_validator_1.query)("from").optional().isISO8601().not().isArray(), (0, express_validator_1.query)("to").optional().isISO8601().not().isArray()], Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)(this.path), (
|
|
27
|
+
initRoutes() {
|
|
28
|
+
this.router.get("/data", [(0, express_validator_1.query)("from").optional().isISO8601().not().isArray(), (0, express_validator_1.query)("to").optional().isISO8601().not().isArray()], Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)(this.path), this.cacheHeaderMiddleware.getMiddleware(3 * 60, 60), this.controller.getAll);
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
exports.PotHolesRouter = PotHolesRouter = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PotHolesRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/routers/PotHolesRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PotHolesRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/routers/PotHolesRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,kCAA+C;AAC/C,sEAAoE;AACpE,sFAAmF;AAEnF,6EAAkH;AAClH,+DAAuE;AACvE,mFAAoE;AACpE,iEAAgE;AAEzD,IAAM,cAAc,4BAApB,MAAM,cAAe,SAAQ,+BAAc;IAI9C;QACI,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,sBAAiB,CAAC,OAAO,CAAsB,2CAAoB,CAAC,kBAAkB,CAAC,CAAC;QAC1G,IAAI,CAAC,qBAAqB,GAAG,sBAAiB,CAAC,OAAO,CAAwB,oBAAc,CAAC,qBAAqB,CAAC,CAAC;QACpH,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAES,UAAU;QAChB,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,OAAO,EACP,CAAC,IAAA,yBAAK,EAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,IAAA,yBAAK,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,EAC1G,uBAAU,EACV,wBAAW,EACX,IAAA,sCAAyB,EAAC,IAAI,CAAC,IAAI,CAAC,EACpC,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EACpD,IAAI,CAAC,UAAU,CAAC,MAAM,CACzB,CAAC;IACN,CAAC;CACJ,CAAA;yBAtBY,cAAc;IAD1B,IAAA,qBAAU,GAAE;;GACA,cAAc,CAsB1B;AAED,MAAM,gBAAgB,GAAmB,IAAI,cAAc,EAAE,CAAC;AAErD,4CAAgB"}
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -58,6 +58,12 @@ paths:
|
|
|
58
58
|
responses:
|
|
59
59
|
"200":
|
|
60
60
|
description: successful operation
|
|
61
|
+
headers:
|
|
62
|
+
Cache-Control:
|
|
63
|
+
description: Cache control directive for caching proxies
|
|
64
|
+
schema:
|
|
65
|
+
type: string
|
|
66
|
+
example: public, s-maxage=180, stale-while-revalidate=60
|
|
61
67
|
content:
|
|
62
68
|
application/json:
|
|
63
69
|
schema:
|