Add GCM consent types to version snapshot
Include gcm_consent_types in the published banner config so the cookie banner SDK can read category-to-GCM mappings from the config endpoint. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -348,12 +348,17 @@ func buildSnapshot(
|
|||||||
if cookies == nil {
|
if cookies == nil {
|
||||||
cookies = coredata.CookieItems{}
|
cookies = coredata.CookieItems{}
|
||||||
}
|
}
|
||||||
|
gcmConsentTypes := c.GCMConsentTypes
|
||||||
|
if gcmConsentTypes == nil {
|
||||||
|
gcmConsentTypes = []string{}
|
||||||
|
}
|
||||||
snapshotCategories[i] = coredata.CookieBannerVersionSnapshotCategory{
|
snapshotCategories[i] = coredata.CookieBannerVersionSnapshotCategory{
|
||||||
Name: c.Name,
|
Name: c.Name,
|
||||||
Slug: c.Slug,
|
Slug: c.Slug,
|
||||||
Description: c.Description,
|
Description: c.Description,
|
||||||
Kind: c.Kind,
|
Kind: c.Kind,
|
||||||
Cookies: cookies,
|
Cookies: cookies,
|
||||||
|
GCMConsentTypes: gcmConsentTypes,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,12 @@ type (
|
|||||||
}
|
}
|
||||||
|
|
||||||
CookieBannerVersionSnapshotCategory struct {
|
CookieBannerVersionSnapshotCategory struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Slug string `json:"slug"`
|
Slug string `json:"slug"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
Kind CookieCategoryKind `json:"kind"`
|
Kind CookieCategoryKind `json:"kind"`
|
||||||
Cookies CookieItems `json:"cookies"`
|
Cookies CookieItems `json:"cookies"`
|
||||||
|
GCMConsentTypes []string `json:"gcm_consent_types"`
|
||||||
}
|
}
|
||||||
|
|
||||||
CookieBannerVersion struct {
|
CookieBannerVersion struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user