Skip to content

Commit

Permalink
fix: re-add buildimage filter to project query
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Dec 4, 2023
1 parent 9d1933b commit 5cd4871
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/api/src/resources/project/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const getProjectDeployKey: ResolverFn = async (

export const getAllProjects: ResolverFn = async (
root,
{ order, createdAfter, gitUrl },
{ order, createdAfter, gitUrl, buildImage },
{ sqlClientPool, hasPermission, models, keycloakGrant, keycloakUsersGroups }
) => {
let userProjectIds: number[];
Expand Down Expand Up @@ -97,6 +97,10 @@ export const getAllProjects: ResolverFn = async (
queryBuilder = queryBuilder.andWhere('git_url', gitUrl);
}

if (buildImage) {
queryBuilder = queryBuilder.and.whereNot('build_image', '');
}

if (userProjectIds) {
queryBuilder = queryBuilder.whereIn('id', userProjectIds);
}
Expand Down

0 comments on commit 5cd4871

Please sign in to comment.