Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into develop
This commit is contained in:
commit
e21dd584a9
169 changed files with 3933 additions and 1616 deletions
|
@ -3,6 +3,7 @@ import { parseStatus, parseUser, parseNotification, parseAttachment, parseChat,
|
|||
import { RegistrationError, StatusCodeError } from '../errors/errors'
|
||||
|
||||
/* eslint-env browser */
|
||||
const MUTES_IMPORT_URL = '/api/pleroma/mutes_import'
|
||||
const BLOCKS_IMPORT_URL = '/api/pleroma/blocks_import'
|
||||
const FOLLOW_IMPORT_URL = '/api/pleroma/follow_import'
|
||||
const DELETE_ACCOUNT_URL = '/api/pleroma/delete_account'
|
||||
|
@ -540,8 +541,10 @@ const fetchTimeline = ({
|
|||
|
||||
const queryString = map(params, (param) => `${param[0]}=${param[1]}`).join('&')
|
||||
url += `?${queryString}`
|
||||
|
||||
let status = ''
|
||||
let statusText = ''
|
||||
|
||||
let pagination = {}
|
||||
return fetch(url, { headers: authHeaders(credentials) })
|
||||
.then((data) => {
|
||||
|
@ -711,6 +714,17 @@ const setMediaDescription = ({ id, description, credentials }) => {
|
|||
}).then((data) => parseAttachment(data))
|
||||
}
|
||||
|
||||
const importMutes = ({ file, credentials }) => {
|
||||
const formData = new FormData()
|
||||
formData.append('list', file)
|
||||
return fetch(MUTES_IMPORT_URL, {
|
||||
body: formData,
|
||||
method: 'POST',
|
||||
headers: authHeaders(credentials)
|
||||
})
|
||||
.then((response) => response.ok)
|
||||
}
|
||||
|
||||
const importBlocks = ({ file, credentials }) => {
|
||||
const formData = new FormData()
|
||||
formData.append('list', file)
|
||||
|
@ -1295,6 +1309,7 @@ const apiService = {
|
|||
getCaptcha,
|
||||
updateProfileImages,
|
||||
updateProfile,
|
||||
importMutes,
|
||||
importBlocks,
|
||||
importFollows,
|
||||
deleteAccount,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue