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:
TAKAHASHI Shuuji 2024-03-01 03:34:28 +09:00
parent 4a0345a059
commit 9fabaad1ec
No known key found for this signature in database
GPG key ID: F15C887632129F5E

View file

@ -86,6 +86,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,