diff --git a/src/util/recalls.ts b/src/util/recalls.ts index a84e40ce..95c8be93 100644 --- a/src/util/recalls.ts +++ b/src/util/recalls.ts @@ -28,7 +28,14 @@ export const filterMotRecalls = (vehicleRecalls: MotRecalls): RecallsSchema => { */ export const getMotRecallsByVin = async (vin: string, cache: Map, motSecret: MotSecret): Promise => { logger.debug('Calling MOT Recalls'); - logger.debug(`MotSecret: ${motSecret}`); + + logger.debug(`clientID: ${process.env.CLIENT_ID}`); + logger.debug(`clientSecret: ${process.env.CLIENT_SECRET}`); + logger.debug(`scopeURL: ${process.env.SCOPE_URL}`); + logger.debug(`accessTokenURL: ${process.env.ACCESS_TOKEN_URL}`); + logger.debug(`apiKey: ${process.env.API_KEY}`); + logger.debug(`apiURL: ${process.env.API_URL}`); + try { const bearerToken = cache.get('bearerToken') as string; const motApiUrl = `${motSecret.apiURL}/${vin}`; @@ -39,7 +46,7 @@ export const getMotRecallsByVin = async (vin: string, cache: Map let recallResponse = await fetch(motApiUrl, { headers: { - 'Authorization': `Bearer ${bearerToken}`, + Authorization: `Bearer ${bearerToken}`, 'x-api-key': `${motSecret.apiKey}`, }, }); @@ -57,7 +64,7 @@ export const getMotRecallsByVin = async (vin: string, cache: Map cache.set('bearerToken', newBearerToken); recallResponse = await fetch(motApiUrl, { headers: { - 'Authorization': `Bearer ${bearerToken}`, + Authorization: `Bearer ${bearerToken}`, 'x-api-key': `${motSecret.apiKey}`, }, });