MCPcopy Index your code
hub / github.com/codecombat/codecombat / checkForNewAchievement

Method checkForNewAchievement

app/models/User.js:1209–1220  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

1207 }
1208
1209 checkForNewAchievement (options = {}) {
1210 options.url = _.result(this, 'url') + '/check-for-new-achievement'
1211 options.type = 'POST'
1212 const jqxhr = this.fetch(options)
1213
1214 // Setting @loading to false because otherwise, if the user tries to edit their settings while checking
1215 // for new achievements, the changes won't be saved. This is because AccountSettingsView relies on
1216 // hasLocalChanges, and that is only true if, when set is called, the model isn't "loading".
1217 this.loading = false
1218
1219 return jqxhr
1220 }
1221
1222 recalculateHsStars (options = {}) {
1223 options.url = _.result(this, 'url') + '/recalculate-hs-stars'

Callers 2

initializeFunction · 0.80
checkForNewAchievementFunction · 0.80

Calls 1

fetchMethod · 0.45

Tested by

no test coverage detected