@@ -79,7 +79,7 @@ export default class OBPConsentsService {
7979 // I.e. give permission to Opey to do anything on behalf of the logged in user
8080
8181 // Get the Consents API client from the OBP SDK
82- const client = await this . createUserConsentsClient ( session , ' /obp/v5.1.0 /my/consents/IMPLICIT' , 'POST' )
82+ const client = await this . createUserConsentsClient ( session , ` /obp/${ process . env . VITE_OBP_API_VERSION } /my/consents/IMPLICIT` , 'POST' )
8383 if ( ! client ) {
8484 throw new Error ( 'Could not create Consents API client' )
8585 }
@@ -150,7 +150,7 @@ export default class OBPConsentsService {
150150 }
151151
152152 try {
153- const response = await this . _sendOBPRequest ( `/obp/v5.1.0 /user/current/consents/${ consentId } ` , 'GET' , clientConfig )
153+ const response = await this . _sendOBPRequest ( `/obp/${ process . env . VITE_OBP_API_VERSION } /user/current/consents/${ consentId } ` , 'GET' , clientConfig )
154154
155155 session [ 'opeyConfig' ] = {
156156 authConfig : {
@@ -182,7 +182,7 @@ export default class OBPConsentsService {
182182
183183 // Get the Consents API client from the OBP SDK
184184 // The OBP SDK is messed up here, so we'll need to use Fetch until the SWAGGER WILL ACTUALLY WORK
185- // const client = await this.createUserConsentsClient(session, ' /obp/v5.1.0 /my/consents/IMPLICIT' , 'POST')
185+ // const client = await this.createUserConsentsClient(session, ` /obp/${process.env.VITE_OBP_API_VERSION} /my/consents/IMPLICIT` , 'POST')
186186 // if (!client) {
187187 // throw new Error('Could not create Consents API client')
188188 // }
@@ -197,8 +197,8 @@ export default class OBPConsentsService {
197197
198198 // We need to change this back to consent infos once OBP shows 'EXPIRED' in the status
199199 // Right now we have to check the JWT ourselves
200- const consentInfosPath = ' /obp/v5.1.0 /my/consents'
201- //const consentInfosPath = ' /obp/v5.1.0 /my/consent-infos'
200+ const consentInfosPath = ` /obp/${ process . env . VITE_OBP_API_VERSION } /my/consents`
201+ //const consentInfosPath = ` /obp/${process.env.VITE_OBP_API_VERSION} /my/consent-infos`
202202
203203 let opeyConsentId : string | null = null
204204 try {
0 commit comments