From 9fabaad1ec331f34d9ecb4e423f550756d02a5e6 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Fri, 1 Mar 2024 03:34:28 +0900 Subject: [PATCH] feat: convert datetime string into ISO 8601 datetime string ref. statuses API methods - Mastodon documentation - https://docs.joinmastodon.org/methods/statuses/#form-data-parameters --- composables/masto/publish.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/composables/masto/publish.ts b/composables/masto/publish.ts index 5e444c3b..8569a852 100644 --- a/composables/masto/publish.ts +++ b/composables/masto/publish.ts @@ -86,6 +86,10 @@ export function usePublish(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 = { ...draftItem.value.params, spoilerText: publishSpoilerText.value,