diff --git a/src/libs/routes/class.js b/src/libs/routes/class.js index 741d691d384eac040d2b6ca8678f520497ddf425..b1a02c40c0c419de2181c8a701e90e4ef03e8722 100644 --- a/src/libs/routes/class.js +++ b/src/libs/routes/class.js @@ -18,6 +18,8 @@ const id2str = require(`${libs}/middlewares/id2str`); const config = require(`${libs}/config`); +const request = require(`request`); + const cache = require('apicache').options({ debug: config.debug, statusCodes: {include: [200]} }).middleware; let rqfCount = new ReqQueryFields(); diff --git a/src/libs/routes/enrollment.js b/src/libs/routes/enrollment.js index 5686779c1137646d3a65197525d5a2e5a0c475f1..f67c4c9d2bdda7a0ba4e610f605d20fc7f037aab 100644 --- a/src/libs/routes/enrollment.js +++ b/src/libs/routes/enrollment.js @@ -18,6 +18,8 @@ const id2str = require(`${libs}/middlewares/id2str`); const config = require(`${libs}/config`); +const request = require(`request`); + const cache = require('apicache').options({ debug: config.debug, statusCodes: {include: [200]} }).middleware; enrollmentApp.use(cache('15 day')); diff --git a/src/libs/routes/teacher.js b/src/libs/routes/teacher.js index 4fc2c5c7aed0b331db69063f6ea91f62082b61f3..d1d8267aa46711a5fa05d62fd2fbd0c6f0c328fe 100644 --- a/src/libs/routes/teacher.js +++ b/src/libs/routes/teacher.js @@ -18,6 +18,8 @@ const id2str = require(`${libs}/middlewares/id2str`); const config = require(`${libs}/config`); +const request = require(`request`); + const cache = require('apicache').options({ debug: config.debug, statusCodes: {include: [200]} }).middleware; let rqf = new ReqQueryFields();