update api service functions
This commit is contained in:
parent
daba688f46
commit
2ce0186327
1 changed files with 5 additions and 11 deletions
|
@ -213,19 +213,13 @@ const unfollowUser = ({id, credentials}) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const pinOwnStatus = ({ id, credentials }) => {
|
const pinOwnStatus = ({ id, credentials }) => {
|
||||||
return promisedRequest(MASTODON_PIN_OWN_STATUS(id), {
|
return promisedRequest({ url: MASTODON_PIN_OWN_STATUS(id), credentials, method: 'POST' })
|
||||||
headers: authHeaders(credentials),
|
.then((data) => parseStatus(data))
|
||||||
method: 'POST'
|
|
||||||
})
|
|
||||||
.then((data) => parseStatus(data))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const unpinOwnStatus = ({ id, credentials }) => {
|
const unpinOwnStatus = ({ id, credentials }) => {
|
||||||
return promisedRequest(MASTODON_UNPIN_OWN_STATUS(id), {
|
return promisedRequest({ url: MASTODON_UNPIN_OWN_STATUS(id), credentials, method: 'POST' })
|
||||||
headers: authHeaders(credentials),
|
.then((data) => parseStatus(data))
|
||||||
method: 'POST'
|
|
||||||
})
|
|
||||||
.then((data) => parseStatus(data))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const blockUser = ({id, credentials}) => {
|
const blockUser = ({id, credentials}) => {
|
||||||
|
@ -508,7 +502,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
|
||||||
|
|
||||||
const fetchPinnedStatuses = ({ id, credentials }) => {
|
const fetchPinnedStatuses = ({ id, credentials }) => {
|
||||||
const url = MASTODON_USER_TIMELINE_URL(id) + '?pinned=true'
|
const url = MASTODON_USER_TIMELINE_URL(id) + '?pinned=true'
|
||||||
return promisedRequest(url, { headers: authHeaders(credentials) })
|
return promisedRequest({ url, credentials })
|
||||||
.then((data) => data.map(parseStatus))
|
.then((data) => data.map(parseStatus))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue