({ data }, options = {})
| 26 | * @returns {Promise<Object>} raw Cutscene object |
| 27 | */ |
| 28 | export 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. |
nothing calls this directly
no outgoing calls
no test coverage detected