From e336d2ad3859c1a52e4e1be48e24f5fa0a709971 Mon Sep 17 00:00:00 2001 From: simlarsen Date: Wed, 10 Jul 2024 13:00:09 +0000 Subject: [PATCH] OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/Pagination.ts --- App/FeatureSet/ApiReference/Service/Pagination.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/App/FeatureSet/ApiReference/Service/Pagination.ts b/App/FeatureSet/ApiReference/Service/Pagination.ts index 5b91bbb6c8..6522094bc1 100644 --- a/App/FeatureSet/ApiReference/Service/Pagination.ts +++ b/App/FeatureSet/ApiReference/Service/Pagination.ts @@ -16,27 +16,29 @@ export default class ServiceHandler { const page: string | undefined = req.params["page"]; // Get the page parameter from the request const pageData: any = {}; // Initialize page data object - pageTitle = "Pagination"; // Set page title - pageDescription = "Learn how to paginate requests with OneUptime API"; // Set page description + // Set page title and description + pageTitle = "Pagination"; + pageDescription = "Learn how to paginate requests with OneUptime API"; - // Get response code from LocalCache or LocalFile + // Get response and request code from LocalCache or LocalFile pageData.responseCode = await LocalCache.getOrSetString( "pagination", "response", async () => { + // Read Response.md file from CodeExamplesPath return await LocalFile.read( - `${CodeExamplesPath}/Pagination/Response.md`, // Read Response.md file from CodeExamplesPath + `${CodeExamplesPath}/Pagination/Response.md`, ); }, ); - // Get request code from LocalCache or LocalFile pageData.requestCode = await LocalCache.getOrSetString( "pagination", "request", async () => { + // Read Request.md file from CodeExamplesPath return await LocalFile.read( - `${CodeExamplesPath}/Pagination/Request.md`, // Read Request.md file from CodeExamplesPath + `${CodeExamplesPath}/Pagination/Request.md`, ); }, );