Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log #55

Merged
merged 1 commit into from
Dec 18, 2024
Merged

log #55

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading