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

Function putTint

ozaria/site/api/tint.js:8–20  ·  view source on GitHub ↗
({ data }, options = {})

Source from the content-addressed store, hash-verified

6 * @returns {Object} Tint object
7 */
8export const putTint = ({ data }, options = {}) => {
9 if (!data) {
10 throw new Error('Please pass in a data property.')
11 }
12 const slugOrId = data.id || data.slug
13 if (!slugOrId) {
14 throw new Error('You must pass either a slug or ObjectId')
15 }
16 return fetchJson(`/db/tint/${slugOrId}`, _.assign({}, options, {
17 method: 'PUT',
18 json: data
19 }))
20}
21
22/**
23 * Returns a list of all tint objects.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected