Skip to content

Commit ead694e

Browse files
authored
Merge pull request #243 from sametcodes/239-implementing-caching-on-the-view-api
feat(#239): applied caching control to the public view API
2 parents 7d01bcb + bf01e00 commit ead694e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pages/api/view/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import {
66
validatePublicRequest,
77
validatePublicBody,
88
} from "@/middlewares/api/public";
9-
// import { setCacheControl } from "@/middlewares/api/cache";
9+
import { setCacheControl } from "@/middlewares/api/cache";
1010
import handlePlatformAPI from "@/services/api/handler";
1111

1212
export default nextConnect()
1313
.use(validatePublicRequest)
1414
.use(validatePublicBody)
1515
.use(resolveHandler)
16-
// .use(setCacheControl)
16+
.use(setCacheControl)
1717
.get((req: NextApiRequest, res: NextApiResponse) => {
1818
const { services, templates, query, config } = res.locals;
1919
return handlePlatformAPI(services, templates, query, config)(req, res);

0 commit comments

Comments
 (0)