From 1ff0b0062d7a9f9c1234dc3c2a0518327c181e5b Mon Sep 17 00:00:00 2001 From: "raja.blaze" Date: Tue, 10 Sep 2019 18:38:51 +0530 Subject: [PATCH] cache updated --- server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.ts b/server.ts index 70d2a4a..3881bc6 100644 --- a/server.ts +++ b/server.ts @@ -32,7 +32,7 @@ import { Request, Response, NextFunction } from "express"; import bodyParser from "body-parser"; //import { logger } from "./server/utils"; import swaggerJSDoc from "swagger-jsdoc"; -import { errorMiddleware } from "./server/middlewares"; +import { errorMiddleware, redisMiddleware } from "./server/middlewares"; import { getRepository, In, @@ -121,7 +121,7 @@ controllers.forEach(controller => { // Example Express Rest API endpoints import request from 'request-promise'; -app.get("/api", async (req, res) => { +app.get("/api", redisMiddleware('60'), async (req, res) => { try { let option = req.query.q; let blockDetails = await latestBlockDetails();