kontent-ai / delivery-sdk-js

Kontent Delivery SDK for Javascript
https://kontent.ai
MIT License
50 stars 34 forks source link

Publishing with CM requires date in the future #178

Closed CollierCZ closed 5 years ago

CollierCZ commented 5 years ago

Brief bug description

When attempting to use publishOrScheduleLanguageVariant(), I cannot publish now or at the next scheduled publish

Repro steps

A few cases

  1. Use publishOrScheduleLanguageVariant without .withData -> type error -- is not a function
  2. Use publishOrScheduleLanguageVariant with empty .withData -> 404 -- "The provided value is not a valid date."
  3. Use publishOrScheduleLanguageVariant with date in the past in .withData -> 400 -> "The provided date value needs to be in the future."

Expected behavior

For each case, I expect:

  1. The ability not to include data
  2. The ability not to specific a time
  3. The ability to provide a time in the past and get a 204, as described in the documentation: https://developer.kenticocloud.com/reference#content-management-api-v2-publish-language-variant

Test environment

Firefox

Enngage commented 5 years ago

Moved to https://github.com/Kentico/kontent-management-sdk-js/issues/5