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 {
|
||||
cookies = coredata.CookieItems{}
|
||||
}
|
||||
gcmConsentTypes := c.GCMConsentTypes
|
||||
if gcmConsentTypes == nil {
|
||||
gcmConsentTypes = []string{}
|
||||
}
|
||||
snapshotCategories[i] = coredata.CookieBannerVersionSnapshotCategory{
|
||||
Name: c.Name,
|
||||
Slug: c.Slug,
|
||||
Description: c.Description,
|
||||
Kind: c.Kind,
|
||||
Cookies: cookies,
|
||||
Name: c.Name,
|
||||
Slug: c.Slug,
|
||||
Description: c.Description,
|
||||
Kind: c.Kind,
|
||||
Cookies: cookies,
|
||||
GCMConsentTypes: gcmConsentTypes,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,11 +49,12 @@ type (
|
||||
}
|
||||
|
||||
CookieBannerVersionSnapshotCategory struct {
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
Description string `json:"description"`
|
||||
Kind CookieCategoryKind `json:"kind"`
|
||||
Cookies CookieItems `json:"cookies"`
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
Description string `json:"description"`
|
||||
Kind CookieCategoryKind `json:"kind"`
|
||||
Cookies CookieItems `json:"cookies"`
|
||||
GCMConsentTypes []string `json:"gcm_consent_types"`
|
||||
}
|
||||
|
||||
CookieBannerVersion struct {
|
||||
|
||||
Reference in New Issue
Block a user