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

Function getAnonymizationStatus

app/core/utils.js:51–61  ·  view source on GitHub ↗
(league, supermodel)

Source from the content-addressed store, hash-verified

49}
50
51const getAnonymizationStatus = function (league, supermodel) {
52 if (!league || !features.enableAnonymization) {
53 return new Promise((resolve, reject) => resolve(false))
54 }
55
56 const fetchAnonymous = $.get('/esports/anonymous/' + league)
57 supermodel.trackRequest(fetchAnonymous)
58 return new Promise((resolve, reject) => fetchAnonymous.then(res => {
59 return resolve(res.anonymous)
60 }))
61}
62
63const anonymizingUser = function (user) {
64 const id = (user != null ? user.id : undefined) != null ? (user != null ? user.id : undefined) : user

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected