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

Add klamm service and controller for requesting rule info. #58

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

brysonjbest
Copy link
Collaborator

API support for bcgov/brm-app#56.
Pulls all rules from the Klamm bre rules endpoint.

Comment on lines 76 to 83
async getKlammBRERules(): Promise<string[]> {
try {
const { data } = await this.axiosKlammInstance.get(`${process.env.KLAMM_API_URL}/api/brerules`);
return data;
} catch (err) {
throw new HttpException('Error fetching from Klamm', HttpStatus.INTERNAL_SERVER_ERROR);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_getAllKlammFields already does this. Maybe remove that method and have the code call this one instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel silly for missing this! Thank you, will update.

Copy link
Collaborator Author

@brysonjbest brysonjbest Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the duplication and updated BRM App PR bcgov/brm-app#56 to match.

@brysonjbest brysonjbest merged commit ed8bc14 into dev Dec 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants