Skip to content

Commit

Permalink
Hotfix for missing application/json header in Prepr example (#55517)
Browse files Browse the repository at this point in the history
I added the application/json header to the API lib of the Prepr example.
Because without it when statically generating an error is produced by
GraphQL.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Kevintjuhz and kodiakhq[bot] authored Sep 18, 2023
1 parent ff36684 commit d420233
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/cms-prepr/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ async function fetchAPI(query, { variables, preview } = {}) {
const response = await fetch(process.env.PREPRIO_API, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization:
'Bearer ' +
(preview
Expand Down

0 comments on commit d420233

Please sign in to comment.