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

Method getUnconflictedName

app/models/User.js:234–241  ·  view source on GitHub ↗
(name, done)

Source from the content-addressed store, hash-verified

232 }
233
234 static getUnconflictedName (name, done) {
235 // deprecate in favor of @checkNameConflicts, which uses Promises and returns the whole response
236 return $.ajax(`/auth/name/${encodeURIComponent(name)}`, {
237 cache: false,
238 success (data) { return done(data.suggestedName) },
239 },
240 )
241 }
242
243 static checkNameConflicts (name) {
244 return new Promise((resolve, reject) => $.ajax(`/auth/name/${encodeURIComponent(name)}`, {

Callers 1

onChangeNameInputMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected