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

Function putCutscene

ozaria/site/api/cutscene.js:28–40  ·  view source on GitHub ↗
({ data }, options = {})

Source from the content-addressed store, hash-verified

26 * @returns {Promise<Object>} raw Cutscene object
27 */
28export const putCutscene = ({ data }, options = {}) => {
29 if (!data) {
30 throw new Error('Please pass in a data property.')
31 }
32 const slugOrId = data.id || data.slug
33 if (!slugOrId) {
34 throw new Error('You must pass either a slug or ObjectId')
35 }
36 return fetchJson(`/db/cutscene/${slugOrId}`, _.assign({}, options, {
37 method: 'PUT',
38 json: data
39 }))
40}
41
42/**
43 * Creates a new cutscene in the database.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected