Commit 93e9bc01 authored by Tae Hoon's avatar Tae Hoon

clean up fetchPinnedStatuses api service

parent 83083150
......@@ -506,14 +506,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
const fetchPinnedStatuses = ({ id, credentials }) => {
const url = MASTODON_USER_TIMELINE_URL(id) + '?pinned=true'
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => {
if (data.ok) {
return data
}
throw new Error('Error fetching pinned timeline', data)
})
.then((data) => data.json())
return promisedRequest(url, { headers: authHeaders(credentials) })
.then((data) => data.map(parseStatus))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment