From dd58f29298f1ff5c865773cd4bf0b33f2f00a643 Mon Sep 17 00:00:00 2001 From: Matthew Callis Date: Mon, 25 Dec 2023 00:49:39 -0800 Subject: [PATCH] Fix DownloadRouter.download method typo --- dist/plugins/add-download-route.d.ts | 4 ++-- docs/plugins/add-download-route.md | 4 ++-- src/plugins/add-download-route.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/plugins/add-download-route.d.ts b/dist/plugins/add-download-route.d.ts index cedcc3e..39e7d32 100644 --- a/dist/plugins/add-download-route.d.ts +++ b/dist/plugins/add-download-route.d.ts @@ -119,8 +119,8 @@ declare class DownloadRouter { * @param {object} context A Uttori-like context. * @param {Record} context.config - A provided configuration to use. * @returns {import('express').RequestHandler} The function to pass to Express. - * @example DownloadRouter.upload(context)(request, response, _next) - * server.post('/upload', DownloadRouter.upload); + * @example DownloadRouter.download(context)(request, response, _next) + * server.post('/upload', DownloadRouter.download); * @static */ static download(context: { diff --git a/docs/plugins/add-download-route.md b/docs/plugins/add-download-route.md index 68543bc..e02ac6e 100644 --- a/docs/plugins/add-download-route.md +++ b/docs/plugins/add-download-route.md @@ -136,9 +136,9 @@ The Express route method to process the upload request and provide a response. | context | object | A Uttori-like context. | | context.config | Record.<string, DownloadRouterConfig> | A provided configuration to use. | -**Example** *(DownloadRouter.upload(context)(request, response, _next))* +**Example** *(DownloadRouter.download(context)(request, response, _next))* ```js -server.post('/upload', DownloadRouter.upload); +server.post('/upload', DownloadRouter.download); ``` diff --git a/src/plugins/add-download-route.js b/src/plugins/add-download-route.js index 5539446..0f74b03 100644 --- a/src/plugins/add-download-route.js +++ b/src/plugins/add-download-route.js @@ -177,8 +177,8 @@ class DownloadRouter { * @param {object} context A Uttori-like context. * @param {Record} context.config - A provided configuration to use. * @returns {import('express').RequestHandler} The function to pass to Express. - * @example DownloadRouter.upload(context)(request, response, _next) - * server.post('/upload', DownloadRouter.upload); + * @example DownloadRouter.download(context)(request, response, _next) + * server.post('/upload', DownloadRouter.download); * @static */ static download(context) {