Skip to content

Commit

Permalink
Merge pull request #36 from solaoi/feature_update-dependencies
Browse files Browse the repository at this point in the history
update dependencies
  • Loading branch information
solaoi authored Mar 19, 2022
2 parents b9ed2af + 3ef4ddc commit b0de033
Show file tree
Hide file tree
Showing 3 changed files with 1,477 additions and 2,791 deletions.
11 changes: 7 additions & 4 deletions app/api/[[...slug]].ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ const Handler: BlitzApiHandler = async (req: BlitzApiRequest, res: BlitzApiRespo
method,
} = req
if (!Array.isArray(slug)) {
return res.status(404).end()
res.status(404).end()
return
}
const obj = await dynamicHandler(method, slug)
if (!obj) {
return res.status(404).end()
res.status(404).end()
return
}
const {
id,
Expand Down Expand Up @@ -87,9 +89,10 @@ const Handler: BlitzApiHandler = async (req: BlitzApiRequest, res: BlitzApiRespo
])

if (inNtimesErrorTerm) {
return res.status(Number(ntimesErrorStatusCode)).end()
res.status(Number(ntimesErrorStatusCode)).end()
return
}
return res.status(Number(statusCode)).setHeader("Content-Type", contentType).end(response)
res.status(Number(statusCode)).setHeader("Content-Type", contentType).end(response)
}

export default Handler
Loading

0 comments on commit b0de033

Please sign in to comment.