add basic idempotency support
This commit is contained in:
parent
297a0c1f7f
commit
89a677f5e8
3 changed files with 52 additions and 28 deletions
|
@ -11,7 +11,8 @@ const postStatus = ({
|
|||
media = [],
|
||||
inReplyToStatusId = undefined,
|
||||
contentType = 'text/plain',
|
||||
preview = false
|
||||
preview = false,
|
||||
idempotencyKey = ''
|
||||
}) => {
|
||||
const mediaIds = map(media, 'id')
|
||||
|
||||
|
@ -25,9 +26,14 @@ const postStatus = ({
|
|||
inReplyToStatusId,
|
||||
contentType,
|
||||
poll,
|
||||
preview
|
||||
preview,
|
||||
idempotencyKey
|
||||
})
|
||||
.then((data) => {
|
||||
return {
|
||||
error: 'test'
|
||||
}
|
||||
/*
|
||||
if (!data.error && !preview) {
|
||||
store.dispatch('addNewStatuses', {
|
||||
statuses: [data],
|
||||
|
@ -37,6 +43,7 @@ const postStatus = ({
|
|||
})
|
||||
}
|
||||
return data
|
||||
*/
|
||||
})
|
||||
.catch((err) => {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue