Created
March 5, 2018 21:51
-
-
Save bobsilverberg/202c173e3138ec00b17597bfefbaa75f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return callApi({ | |
auth: true, | |
body: { | |
default_locale: defaultLocale, | |
description, | |
name, | |
slug, | |
// The public=true|false flag is not sent to the API. This is | |
// because collections are always public. Omitting this parameter | |
// should cut down on unexpected bugs. | |
}, | |
endpoint: `accounts/account/${user}/collections/${collectionSlug || ''}`, | |
method: `${action === 'create' ? 'POST' : 'PATCH'}`, | |
state: api, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment