Skip to content

Commit

Permalink
galley: Use bulk query when getting all feature configs for a team us…
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaymankar authored Nov 4, 2024
1 parent 2d98df4 commit ce9d00a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/3-bug-fixes/optimize-get-all-features
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
galley: Use bulk query when getting all feature configs for a team user
4 changes: 3 additions & 1 deletion services/galley/src/Galley/API/Teams/Features/Get.hs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ getAllTeamFeaturesForUser ::
Sem r AllTeamFeatures
getAllTeamFeaturesForUser uid = do
mTid <- getTeamAndCheckMembership uid
hsequence' $ hcpure (Proxy @(GetAllTeamFeaturesForUserConstraints r)) $ Comp $ getFeatureForTeamUser uid mTid
case mTid of
Nothing -> hsequence' $ hcpure (Proxy @(GetAllTeamFeaturesForUserConstraints r)) $ Comp $ getFeatureForUser uid
Just tid -> getAllTeamFeatures tid

getSingleFeatureForUser ::
forall cfg r.
Expand Down

0 comments on commit ce9d00a

Please sign in to comment.