Update Import from FS and ListRemotePacks APIs

This commit is contained in:
Angelina Filippova 2020-03-30 18:50:36 +03:00
parent 34f14c93f7
commit 5805792211

View file

@ -25,8 +25,8 @@ export async function reloadEmoji(host, token) {
export async function importFromFS(host, token) { export async function importFromFS(host, token) {
return await request({ return await request({
baseURL: baseName(host), baseURL: baseName(host),
url: '/api/pleroma/emoji/packs/import_from_fs', url: '/api/pleroma/emoji/packs/import',
method: 'post', method: 'get',
headers: authHeaders(token) headers: authHeaders(token)
}) })
} }
@ -51,10 +51,9 @@ export async function listPacks(host) {
export async function listRemotePacks(host, token, instance) { export async function listRemotePacks(host, token, instance) {
return await request({ return await request({
baseURL: baseName(host), baseURL: baseName(host),
url: `/api/pleroma/emoji/packs/list_from`, url: `/api/pleroma/emoji/packs/remote?url=${baseName(instance)}`,
method: 'post', method: 'get',
headers: authHeaders(token), headers: authHeaders(token)
data: { instance_address: baseName(instance) }
}) })
} }