Skip to content

Commit

Permalink
feat(#239): applied caching control to the public view API
Browse files Browse the repository at this point in the history
  • Loading branch information
sametcodes committed Mar 21, 2024
1 parent 69a61ee commit bf01e00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/api/view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import {
validatePublicRequest,
validatePublicBody,
} from "@/middlewares/api/public";
// import { setCacheControl } from "@/middlewares/api/cache";
import { setCacheControl } from "@/middlewares/api/cache";
import handlePlatformAPI from "@/services/api/handler";

export default nextConnect()
.use(validatePublicRequest)
.use(validatePublicBody)
.use(resolveHandler)
// .use(setCacheControl)
.use(setCacheControl)
.get((req: NextApiRequest, res: NextApiResponse) => {
const { services, templates, query, config } = res.locals;
return handlePlatformAPI(services, templates, query, config)(req, res);
Expand Down

0 comments on commit bf01e00

Please sign in to comment.