Skip to content

Commit

Permalink
fix: increase timout for openlibrary endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkelspiel committed Jun 12, 2024
1 parent 31165c2 commit 0636cdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/api/import/book/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const GET = async (request: NextRequest) => {
headers: {
accept: 'application/json',
},
timeout: 60_000,
};

const work = (
Expand Down
5 changes: 4 additions & 1 deletion app/api/import/search/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export const GET = async (request: NextRequest) => {

const openLibrary = (
await axios.get(
`https://openlibrary.org/search.json?title=${search.replace(' ', '+')}&limit=${take}`
`https://openlibrary.org/search.json?title=${search.replace(' ', '+')}&limit=${take}`,
{
timeout: 60_000,
}
)
).data.docs
.map((ol: any) => {
Expand Down

0 comments on commit 0636cdf

Please sign in to comment.