Fix API calls using a bearer auth token
This commit is contained in:
@@ -12,7 +12,9 @@
|
||||
].join(',')
|
||||
const sort = ['-created_on', 'name'].join(',')
|
||||
const limit = -1
|
||||
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=${fields}&filter[location.slug][rlike]=%${page.params.place}%&limit=${limit}&sort=${sort}`)
|
||||
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=${fields}&filter[location.slug][rlike]=%${page.params.place}%&limit=${limit}&sort=${sort}`, {
|
||||
'Authorization': 'bearer ' + process.env.CONFIG.API_TOKEN
|
||||
})
|
||||
const photos = await req.json()
|
||||
if (req.ok) {
|
||||
return { photos: photos.data }
|
||||
|
||||
Reference in New Issue
Block a user