Skip to content

Commit

Permalink
Fix DownloadRouter.download method typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewCallis committed Dec 25, 2023
1 parent 6b4439d commit dd58f29
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/plugins/add-download-route.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ declare class DownloadRouter {
* @param {object} context A Uttori-like context.
* @param {Record<string, DownloadRouterConfig>} context.config - A provided configuration to use.
* @returns {import('express').RequestHandler} The function to pass to Express.
* @example <caption>DownloadRouter.upload(context)(request, response, _next)</caption>
* server.post('/upload', DownloadRouter.upload);
* @example <caption>DownloadRouter.download(context)(request, response, _next)</caption>
* server.post('/upload', DownloadRouter.download);
* @static
*/
static download(context: {
Expand Down
4 changes: 2 additions & 2 deletions docs/plugins/add-download-route.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ The Express route method to process the upload request and provide a response.
| context | <code>object</code> | A Uttori-like context. |
| context.config | <code>Record.&lt;string, DownloadRouterConfig&gt;</code> | 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);
```
<a name="DownloadRouterConfig"></a>

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/add-download-route.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ class DownloadRouter {
* @param {object} context A Uttori-like context.
* @param {Record<string, DownloadRouterConfig>} context.config - A provided configuration to use.
* @returns {import('express').RequestHandler} The function to pass to Express.
* @example <caption>DownloadRouter.upload(context)(request, response, _next)</caption>
* server.post('/upload', DownloadRouter.upload);
* @example <caption>DownloadRouter.download(context)(request, response, _next)</caption>
* server.post('/upload', DownloadRouter.download);
* @static
*/
static download(context) {
Expand Down

0 comments on commit dd58f29

Please sign in to comment.