Skip to content

Commit

Permalink
Correct @hapi/boom usage example (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
RavenHursT committed Aug 22, 2021
1 parent fa48560 commit 904db98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,16 @@ app.use(router.allowedMethods());
```javascript
const Koa = require('koa');
const Router = require('@koa/router');
const Boom = require('boom');
const Boom = require('@hapi/boom');

const app = new Koa();
const router = new Router();

app.use(router.routes());
app.use(router.allowedMethods({
throw: true,
notImplemented: () => new Boom.notImplemented(),
methodNotAllowed: () => new Boom.methodNotAllowed()
notImplemented: () => Boom.notImplemented(),
methodNotAllowed: () => Boom.methodNotAllowed()
}));
```
<a name="module_koa-router--Router+redirect"></a>
Expand Down

0 comments on commit 904db98

Please sign in to comment.