Skip to content

Commit

Permalink
Use the latest Single Consent API client
Browse files Browse the repository at this point in the history
* Provides the improved cross-origin link decoration
* Installation process changed slightly
  • Loading branch information
andyhd committed Aug 30, 2023
1 parent c9e2fde commit 75aeee3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ govuk_publishing_components:
.PHONY: consent_api
consent_api:
mkdir -p $(STATIC)/javascripts
cp node_modules/@alphagov/consent-api/client/src/*.js $(STATIC)/javascripts/
cp node_modules/@alphagov/consent-api/client/src/singleconsent.js $(STATIC)/javascripts/
cp node_modules/@alphagov/consent-api/client/example/*.js $(STATIC)/javascripts/

.PHONY: assets
assets: govuk_frontend govuk_publishing_components consent_api
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"node": ">=18.12.1"
},
"dependencies": {
"@alphagov/consent-api": "alphagov/consent-api#semver:1.6.0",
"@alphagov/consent-api": "alphagov/consent-api#semver:1.10.0",
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.19.3",
Expand Down
2 changes: 1 addition & 1 deletion sde_prototype_govuk/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

application_js = Bundle(
"javascripts/utils.js",
"javascripts/consent.js",
"javascripts/singleconsent.js",
"javascripts/cookie-banner.js",
"javascripts/cookies-page.js",
filters=[
Expand Down
2 changes: 1 addition & 1 deletion sde_prototype_govuk/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
'ariaLabel': 'Cookies on GOV.UK',
'attributes': {
'data-module': 'govuk-cookie-banner consent',
'data-consent-api-url': getenv('CONSENT_API_URL')
'data-consent-api-url': getenv('CONSENT_API_URL', 'https://consent-api-bgzqvpmbyq-nw.a.run.app/api/v1/consent/')
},
'messages': [
{
Expand Down

0 comments on commit 75aeee3

Please sign in to comment.