sb-mig 6.0.0-beta.8 → 6.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -234,7 +234,7 @@ export const createStory = (content, config) => {
234
234
  return sbApi
235
235
  .post(`spaces/${spaceId}/stories/`, {
236
236
  story: content,
237
- publish: 1,
237
+ publish: true,
238
238
  })
239
239
  .then((res) => res.data)
240
240
  .catch((err) => console.error(err));
@@ -250,8 +250,8 @@ export const updateStory = (content, storyId, options, config) => {
250
250
  return sbApi
251
251
  .put(`spaces/${spaceId}/stories/${storyId}`, {
252
252
  story: content,
253
- publish: options.publish ? 1 : 0,
254
- force_update: options.force_update ? 1 : 0,
253
+ publish: options.publish === true,
254
+ force_update: options.force_update === true,
255
255
  })
256
256
  .then((res) => {
257
257
  console.log(`${chalk.green(res.data.story.full_slug)} updated.`);
@@ -248,7 +248,7 @@ const createStory = (content, config) => {
248
248
  return sbApi
249
249
  .post(`spaces/${spaceId}/stories/`, {
250
250
  story: content,
251
- publish: 1,
251
+ publish: true,
252
252
  })
253
253
  .then((res) => res.data)
254
254
  .catch((err) => console.error(err));
@@ -265,8 +265,8 @@ const updateStory = (content, storyId, options, config) => {
265
265
  return sbApi
266
266
  .put(`spaces/${spaceId}/stories/${storyId}`, {
267
267
  story: content,
268
- publish: options.publish ? 1 : 0,
269
- force_update: options.force_update ? 1 : 0,
268
+ publish: options.publish === true,
269
+ force_update: options.force_update === true,
270
270
  })
271
271
  .then((res) => {
272
272
  console.log(`${chalk_1.default.green(res.data.story.full_slug)} updated.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sb-mig",
3
- "version": "6.0.0-beta.8",
3
+ "version": "6.0.0-beta.9",
4
4
  "description": "CLI to rule the world. (and handle stuff related to Storyblok CMS)",
5
5
  "author": "Marcin Krawczyk <marckraw@icloud.com>",
6
6
  "license": "MIT",