diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-10-01 12:54:54 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-10-01 12:54:54 +0000 |
| commit | 8a34ff2957e28f7531c62c793ea4f24558e08ced (patch) | |
| tree | a631749e1fe647085d2ea328b5840b56b344b04e /src/services/api/api.service.js | |
| parent | fa9176651952468ee996abe0e67d62d9a72d5a69 (diff) | |
| parent | 68c2a5b18f887f3db2f5685953bc5175aaaabbd3 (diff) | |
Merge branch 'develop' into 'feat/masto-ws-deletes'
# Conflicts:
# CHANGELOG.md
# src/components/status/status.js
# src/components/status/status.scss
Diffstat (limited to 'src/services/api/api.service.js')
| -rw-r--r-- | src/services/api/api.service.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index da519001..1a3495d4 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -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' @@ -539,8 +540,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) => { @@ -710,6 +713,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) @@ -1280,6 +1294,7 @@ const apiService = { getCaptcha, updateProfileImages, updateProfile, + importMutes, importBlocks, importFollows, deleteAccount, |
