feat: convert datetime string into ISO 8601 datetime string
ref. statuses API methods - Mastodon documentation - https://docs.joinmastodon.org/methods/statuses/#form-data-parameters
This commit is contained in:
parent
0883d1f226
commit
2ed5af94c9
1 changed files with 4 additions and 0 deletions
|
|
@ -87,6 +87,10 @@ export function usePublish(options: {
|
||||||
poll = { ...draftItem.value.params.poll, options }
|
poll = { ...draftItem.value.params.poll, options }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (draft.value.params.scheduledAt)
|
||||||
|
// TODO: return type become non `Status` object now! what to do?
|
||||||
|
draft.value.params.scheduledAt = new Date(draft.value.params.scheduledAt).toISOString()
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
...draftItem.value.params,
|
...draftItem.value.params,
|
||||||
spoilerText: publishSpoilerText.value,
|
spoilerText: publishSpoilerText.value,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue