Fix API calls using a bearer auth token
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
export async function preload (page, session) {
|
||||
const req = await this.fetch(apiEndpoints.gql, {
|
||||
method: 'post',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': 'bearer ' + process.env.CONFIG.API_TOKEN
|
||||
},
|
||||
body: JSON.stringify({ query: `{
|
||||
site {
|
||||
data {
|
||||
|
||||
Reference in New Issue
Block a user