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

Function redeemCredits

app/core/api/user-credits.js:6–12  ·  view source on GitHub ↗
({ operation, id })

Source from the content-addressed store, hash-verified

4const getStudentCredits = (action, student) => fetchJson(`/db/user-credits/${action}?student=${student}`)
5
6const redeemCredits = ({ operation, id }) => fetchJson('/db/user-credits/redeem', {
7 method: 'POST',
8 json: {
9 operation,
10 id
11 }
12})
13
14const updateCreditUid = ({ operation, uid, newId }) => fetchJson('/db/user-credits/update-uid', {
15 method: 'PUT',

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected