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

Update API for suppress image #27796

Merged
merged 4 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion common/test/services/ShouldServeFrontTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class ShouldServeFrontTest
frontsToolSettings = None,
userVisibility = None,
targetedTerritory = None,
suppressImages = None,
),
),
)
Expand Down
12 changes: 10 additions & 2 deletions facia-press/app/frontpress/FapiFrontPress.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ class LiveFapiFrontPress(val wsClient: WSClient, val capiClientForFrontsSeo: Con
): Response[List[PressedContent]] =
FAPI
.liveCollectionContentWithSnaps(collection, adjustSearchQuery, adjustSnapItemQuery)
.map(_.map((item) => PressedContent.make(item, collection.collectionConfig.suppressImages)))
.map(
_.map((item) =>
PressedContent.make(item, collection.collectionConfig.displayHints.flatMap(_.suppressImages).getOrElse(false)),
),
)
}

class DraftFapiFrontPress(val wsClient: WSClient, val capiClientForFrontsSeo: ContentApiClient)(implicit
Expand Down Expand Up @@ -81,7 +85,11 @@ class DraftFapiFrontPress(val wsClient: WSClient, val capiClientForFrontsSeo: Co
): Response[List[PressedContent]] =
FAPI
.draftCollectionContentWithSnaps(collection, adjustSearchQuery, adjustSnapItemQuery)
.map(_.map((item) => PressedContent.make(item, collection.collectionConfig.suppressImages)))
.map(
_.map((item) =>
PressedContent.make(item, collection.collectionConfig.displayHints.flatMap(_.suppressImages).getOrElse(false)),
),
)
}

// This is the json structure we expect for an embed (know as a snap at render-time).
Expand Down
6 changes: 3 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ object Dependencies {
val identityLibVersion = "4.31"
val awsVersion = "1.12.780"
val awsSdk2Version = "2.26.31"
val capiVersion = "33.0.0"
val faciaVersion = "14.0.1"
val capiVersion = "34.0.0"
val faciaVersion = "15.0.0"
val dispatchVersion = "0.13.1"
val romeVersion = "1.0"
val jerseyVersion = "1.19.4"
Expand All @@ -33,7 +33,7 @@ object Dependencies {
val commonsIo = "commons-io" % "commons-io" % "2.16.1"
val cssParser = "net.sourceforge.cssparser" % "cssparser" % "0.9.30"
val contentApiClient = "com.gu" %% "content-api-client" % capiVersion
val contentApiModelsJson = "com.gu" %% "content-api-models-json" % "26.0.0"
val contentApiModelsJson = "com.gu" %% "content-api-models-json" % "27.0.0"
val dfpAxis = "com.google.api-ads" % "dfp-axis" % "5.6.0"
val faciaFapiScalaClient = "com.gu" %% "fapi-client-play30" % faciaVersion
val identityCookie = "com.gu.identity" %% "identity-cookie" % identityLibVersion
Expand Down
Loading