From 950c3d3263a135b4df1156610c8669020b87d608 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Mon, 19 Aug 2024 23:01:41 +0100 Subject: [PATCH] fix: api url path (#1091) --- README.md | 2 +- cypress/support/commands.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2cb38f55..0e857912 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ See the the [Chayn Tech Wiki Guide](https://chayn.notion.site/Chayn-Tech-Contrib ``` # --- REQUIRED --- NEXT_PUBLIC_ENV=local -NEXT_PUBLIC_API_URL=http://localhost:35001/api/v1/ +NEXT_PUBLIC_API_URL=http://localhost:35001/api/v1 NEXT_PUBLIC_BASE_URL=http://localhost:3000 NEXT_PUBLIC_STORYBLOK_TOKEN= # provided in Chayn Tech Wiki Guide. diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 7f53fe14..9697c523 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -61,7 +61,7 @@ Cypress.Commands.add('uiCreateAccessCode', () => { Cypress.Commands.add('createAccessCode', (accessCode) => { cy.getAccessToken().then((token) => { return cy.request({ - url: `${Cypress.env('NEXT_PUBLIC_API_URL')}partner-access`, + url: `${Cypress.env('NEXT_PUBLIC_API_URL')}/partner-access`, method: 'POST', headers: { authorization: `Bearer ${token}`, @@ -76,7 +76,7 @@ Cypress.Commands.add('deleteUser', () => { if (email && email.indexOf('cypress') >= 0) { cy.getAccessToken().then((token) => { cy.request({ - url: `${Cypress.env('NEXT_PUBLIC_API_URL')}user`, + url: `${Cypress.env('NEXT_PUBLIC_API_URL')}/user`, method: 'DELETE', headers: { authorization: `Bearer ${token}`, @@ -89,7 +89,7 @@ Cypress.Commands.add('deleteUser', () => { Cypress.Commands.add('createUser', ({ codeInput, emailInput, passwordInput, partnerId }) => { cy.request({ - url: `${Cypress.env('NEXT_PUBLIC_API_URL')}user`, + url: `${Cypress.env('NEXT_PUBLIC_API_URL')}/user`, method: 'POST', body: { partnerAccessCode: codeInput, @@ -106,7 +106,7 @@ Cypress.Commands.add('createUser', ({ codeInput, emailInput, passwordInput, part Cypress.Commands.add('deleteAllCypressUsers', () => { cy.getAccessToken().then((token) => { cy.request({ - url: `${Cypress.env('NEXT_PUBLIC_API_URL')}user/cypress`, + url: `${Cypress.env('NEXT_PUBLIC_API_URL')}/user/cypress`, method: 'DELETE', headers: { authorization: `Bearer ${token}`, @@ -119,7 +119,7 @@ Cypress.Commands.add('deleteAllCypressUsers', () => { Cypress.Commands.add('deleteCypressAccessCodes', () => { cy.getAccessToken().then((token) => { cy.request({ - url: `${Cypress.env('NEXT_PUBLIC_API_URL')}partner-access/cypress`, + url: `${Cypress.env('NEXT_PUBLIC_API_URL')}/partner-access/cypress`, method: 'DELETE', headers: { authorization: `Bearer ${token}`,