Skip to content

Commit

Permalink
Merge pull request #55 from bcgov/fix/field-name
Browse files Browse the repository at this point in the history
log
  • Loading branch information
hannah-macdonald1 authored Dec 18, 2024
2 parents 3efd738 + 61e755a commit 7e5fb67
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/common/guards/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class AuthService {
upstreamResult = await this.getAssignedIdirUpstream(id, recordType);
await this.cacheManager.set(key, upstreamResult, this.cacheTime);
} else {
this.logger.log(`Cache hit!`);
this.logger.log(`Cache hit! Result: ${upstreamResult}`);
}
if (upstreamResult !== idir) {
return false;
Expand Down Expand Up @@ -103,6 +103,8 @@ export class AuthService {
this.configService.get<string>(`upstreamAuth.${recordType}.endpoint`) +
id;

this.logger.log({ url, params });

let response;
try {
const token =
Expand All @@ -114,6 +116,7 @@ export class AuthService {
response = await firstValueFrom(
this.httpService.get(url, { params, headers }),
);
this.logger.log({ data: response.data });
const idir =
response.data[
this.configService.get<string>(`upstreamAuth.${recordType}.idirField`)
Expand Down

0 comments on commit 7e5fb67

Please sign in to comment.