MCPcopy Create free account
hub / github.com/codecombat/codecombat / saveCookieConsent

Method saveCookieConsent

app/models/User.js:725–736  ·  view source on GitHub ↗
(action, description = '')

Source from the content-addressed store, hash-verified

723 }
724
725 saveCookieConsent (action, description = '') {
726 // Save cookie consent to user's consentHistory
727 // action: 'allow', 'deny', or 'dismiss'
728 const consentHistory = _.clone(this.get('consentHistory')) || []
729 consentHistory.push({
730 action,
731 date: new Date(),
732 type: 'cookies',
733 description,
734 })
735 this.set('consentHistory', consentHistory)
736 }
737
738 getLatestCookieConsent () {
739 // Get the most recent cookie consent from consentHistory

Callers 1

onStatusChangeMethod · 0.80

Calls 3

getMethod · 0.95
cloneMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected