Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
refactor(server): remove redundant await
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Jun 2, 2023
1 parent 20ee86e commit a353ca3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async function plugin(server, config) {
.register(rateLimit, config.rateLimit);

// Register routes
await server
server
/**
* Helmet sets `x-xss-protection` and `content-security-policy` by default.
* These are only useful for HTML/XML content; the only CSP directive that
Expand Down Expand Up @@ -222,6 +222,7 @@ async function plugin(server, config) {
)

// Errors thrown by routes and plugins are caught here
// eslint-disable-next-line promise/prefer-await-to-callbacks
.setErrorHandler(async (err, _req, res) => {
/**
* Catch 5xx errors, log them, and return a generic 500
Expand Down

0 comments on commit a353ca3

Please sign in to comment.