Skip to content

Commit

Permalink
feat(int-1031): Add customFetch method to Storyblok class
Browse files Browse the repository at this point in the history
- Update test file
  • Loading branch information
Thiago Saife Rodrigues committed Dec 26, 2023
1 parent 74ca482 commit 4fd8be5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class Storyblok {

const getRegion = new SbHelpers().getRegionURL
const protocol = config.https === false ? 'http' : 'https'
console.log('config.oauthToken', config.oauthToken)

if (!config.oauthToken) {
endpoint = `${protocol}://${getRegion(config.region)}/${'v2' as Version}`
Expand Down
5 changes: 2 additions & 3 deletions tests/customFetch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ const generateJibberishWord = (length) => {

describe('customFetch', () => {
let client
const url = `spaces/${process.env.VITE_SPACE_ID}/stories`
const url = `spaces/${VITE_SPACE_ID}/stories`

beforeEach(() => {
client = new StoryblokClient({
oauthToken: process.env.VITE_OAUTH_TOKEN,
oauthToken: VITE_OAUTH_TOKEN,
})
console.log('url', client.client.baseURL)
})

test('should call GET method', async () => {
Expand Down

0 comments on commit 4fd8be5

Please sign in to comment.