Skip to content

Commit

Permalink
feat: even more debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshCarter-ops authored Nov 22, 2024
1 parent a76cc36 commit 3f3df34
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/util/recalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ export const filterMotRecalls = (vehicleRecalls: MotRecalls): RecallsSchema => {
*/
export const getMotRecallsByVin = async (vin: string, cache: Map<string, string>, motSecret: MotSecret): Promise<MotRecalls | undefined> => {
logger.debug('Calling MOT Recalls');
logger.debug(`MotSecret: ${motSecret}`);

Check failure on line 31 in src/util/recalls.ts

View workflow job for this annotation

GitHub Actions / tests

Trailing spaces not allowed
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}`);

Check failure on line 38 in src/util/recalls.ts

View workflow job for this annotation

GitHub Actions / tests

Trailing spaces not allowed
try {
const bearerToken = cache.get('bearerToken') as string;
const motApiUrl = `${motSecret.apiURL}/${vin}`;
Expand All @@ -39,7 +46,7 @@ export const getMotRecallsByVin = async (vin: string, cache: Map<string, string>

let recallResponse = await fetch(motApiUrl, {
headers: {
'Authorization': `Bearer ${bearerToken}`,
Authorization: `Bearer ${bearerToken}`,
'x-api-key': `${motSecret.apiKey}`,
},
});
Expand All @@ -57,7 +64,7 @@ export const getMotRecallsByVin = async (vin: string, cache: Map<string, string>
cache.set('bearerToken', newBearerToken);
recallResponse = await fetch(motApiUrl, {
headers: {
'Authorization': `Bearer ${bearerToken}`,
Authorization: `Bearer ${bearerToken}`,
'x-api-key': `${motSecret.apiKey}`,
},
});
Expand Down

0 comments on commit 3f3df34

Please sign in to comment.