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

Automated billing helpers fix #1491

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions services/api/src/helpers/billingGroups.ts
Expand Up @@ -43,7 +43,7 @@ interface IGroup {
export const getAllProjectsNotInBillingGroup = async () => {
const keycloakAdminClient = await getKeycloakAdminClient();
const sqlClient = getSqlClient(USE_SINGLETON);
const GroupModel = Group(keycloakAdminClient);
const GroupModel = Group({keycloakAdminClient });

// GET ALL GROUPS
const groups = await GroupModel.loadAllGroups();
Expand Down Expand Up @@ -73,7 +73,7 @@ export const getAllProjectsNotInBillingGroup = async () => {

export const getAllBillingGroupsWithoutProjects = async () => {
const keycloakAdminClient = await getKeycloakAdminClient();
const GroupModel = Group(keycloakAdminClient);
const GroupModel = Group({keycloakAdminClient });

// Get All Billing Groups
const groupTypeFilterFn = ({ name, value }, group) => {
Expand Down Expand Up @@ -102,7 +102,7 @@ export const getAllBillingGroupsWithoutProjects = async () => {

export const deleteAllBillingGroupsWithoutProjects = async () => {
const keycloakAdminClient = await getKeycloakAdminClient();
const GroupModel = Group(keycloakAdminClient);
const GroupModel = Group({keycloakAdminClient });
const groups = await getAllBillingGroupsWithoutProjects();
await Promise.all(
groups.map(async group => {
Expand Down