updated user_card
This commit is contained in:
parent
9c305c5f93
commit
a26d550137
7 changed files with 240 additions and 150 deletions
|
@ -219,13 +219,16 @@ const authHeaders = (accessToken) => {
|
|||
}
|
||||
}
|
||||
|
||||
const followUser = ({ id, reblogs, credentials }) => {
|
||||
const followUser = ({ id, credentials, ...options }) => {
|
||||
let url = MASTODON_FOLLOW_URL(id)
|
||||
const form = new FormData()
|
||||
if (reblogs !== undefined) { form.append('reblogs', reblogs) }
|
||||
const form = {}
|
||||
if (options.reblogs !== undefined) { form['reblogs'] = options.reblogs }
|
||||
return fetch(url, {
|
||||
body: form,
|
||||
headers: authHeaders(credentials),
|
||||
body: JSON.stringify(form),
|
||||
headers: {
|
||||
...authHeaders(credentials),
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
method: 'POST'
|
||||
}).then((data) => data.json())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue