({ data }, options = {})
| 6 | * @returns {Object} Tint object |
| 7 | */ |
| 8 | export 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. |
nothing calls this directly
no outgoing calls
no test coverage detected