Skip to content

Commit

Permalink
FIX wrong count of api return by visibleApis graphql query
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinovega committed Jan 10, 2025
1 parent 5f6f450 commit d65abca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion daikoku/app/domain/CommonServices.scala
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ object CommonServices {
)
)
} yield {
val count = paginateApis._1.filter(api =>
api.isPublished || myTeams.exists(api.team == _.id)
).size
val sortedApis: Seq[ApiWithAuthorizations] = uniqueApisWithVersion
.filter(api =>
api.isPublished || myTeams.exists(api.team == _.id)
Expand Down Expand Up @@ -529,7 +532,7 @@ object CommonServices {
case _ => ApiWithAuthorizations(api = api, plans = apiPlans)
})
}
ApiWithCount(sortedApis, producerTeams, sortedApis.size)
ApiWithCount(sortedApis, producerTeams, count)
}
})
}
Expand Down

0 comments on commit d65abca

Please sign in to comment.