mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-08 17:39:09 +00:00
clean up fetchPinnedStatuses api service
This commit is contained in:
parent
8308315038
commit
93e9bc019e
1 changed files with 1 additions and 8 deletions
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue