fix: setting default values for draft

zio/stable
Shinigami92 2022-11-29 21:45:20 +01:00
parent e11ed6250d
commit 26f2dec6b6
1 changed files with 8 additions and 7 deletions

View File

@ -23,13 +23,14 @@ export const currentUserDrafts = computed(() => {
return allDrafts.value[id]
})
export function getDefaultDraft({
status = '',
inReplyToId,
visibility = 'public',
placeholder = 'What is on your mind?',
attachments = [],
}: Partial<Draft['params'] & Omit<Draft, 'params'>> = {}): Draft {
export function getDefaultDraft(options: Partial<Draft['params'] & Omit<Draft, 'params'>> = {}): Draft {
const {
status = '',
inReplyToId,
visibility = 'public',
placeholder = 'What is on your mind?',
attachments = [],
} = options
return {
params: {
status,