Skip to content

Commit

Permalink
Add stats for favorited topics
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Nov 28, 2024
1 parent 11dc320 commit 8967ab1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,15 @@ trait SearchConverterService {
Success(
value.getFavorites(
draft.id.get.toString,
List(MyNDLAResourceType.Article, MyNDLAResourceType.Multidisciplinary)
List(MyNDLAResourceType.Article, MyNDLAResourceType.Multidisciplinary, MyNDLAResourceType.Topic)
)
)
case None =>
myndlaApiClient
.getStatsFor(draft.id.get.toString, List(MyNDLAResourceType.Article, MyNDLAResourceType.Multidisciplinary))
.getStatsFor(
draft.id.get.toString,
List(MyNDLAResourceType.Article, MyNDLAResourceType.Multidisciplinary, MyNDLAResourceType.Topic)
)
.map(_.map(_.favourites).sum)
}).?

Expand Down

0 comments on commit 8967ab1

Please sign in to comment.