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

Function upsertSession

app/core/api/levels.js:57–71  ·  view source on GitHub ↗
(levelId, options)

Source from the content-addressed store, hash-verified

55 },
56
57 upsertSession (levelId, options) {
58 if (options == null) { options = {} }
59 const data = {}
60 if (options.courseInstanceId) {
61 data.courseInstance = options.courseInstanceId
62 }
63 if (options.course) {
64 data.course = options.course
65 }
66 if (options.codeLanguage) {
67 data.codeLanguage = options.codeLanguage
68 }
69 const url = `/db/level/${levelId}/session`
70 return fetchJson(url, { data })
71 },
72
73 // fetches interactive/cinematic/cutcsene data for the intro levels
74 fetchIntroContent (introLevels) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected