Skip to content

Commit

Permalink
Issue 331 corrected (#498)
Browse files Browse the repository at this point in the history
fixes #331
  • Loading branch information
aceppaluni authored Mar 26, 2024
1 parent 3eeb1b7 commit b1b34d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions documentation-website/language/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ routes:
example:
title: "Example"
description: "The code below defines a request to a URL from the environment with GET."
middleware: "To apply middlewares add both the pre and post properties as shown in the example. Then proceed to pass in your middleware functions to be executed."
nav: "Routes"

quick-start:
Expand Down
11 changes: 9 additions & 2 deletions documentation-website/src/pages/usage/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,23 @@ const Route = () => <Layout
<div className='card'>
<h2><Lang lnkey='routes.example.title'/></h2>
<div>
<p><Lang lnkey='routes.example.description'/></p>
<p>
<Lang lnkey='routes.example.description'/>
</p>
<p>
<Lang lnkey='routes.example.middleware'/>
</p>
<Code language='typescript'>{`import {
Task,
} from '@idrinth/api-bench';
export default (apiURL, apiPassword): Task => {
main: {
method: 'get',
url: apiURL + '?' + apiPassword,
},
pre: ['^user-agent',],
post: ['^status-2xx','^access-token',],
};
`}</Code>
</div>
Expand Down

0 comments on commit b1b34d1

Please sign in to comment.