forked from AkkomaGang/admin-fe
Update Emoji routes
This commit is contained in:
parent
c5e3aa7f5a
commit
661b828e5c
1 changed files with 7 additions and 7 deletions
|
@ -14,7 +14,7 @@ export async function addNewEmojiFile(packName, file, shortcode, filename, host,
|
||||||
|
|
||||||
return await request({
|
return await request({
|
||||||
baseURL: baseName(host),
|
baseURL: baseName(host),
|
||||||
url: `/api/pleroma/emoji/packs/files?name=${encodeUri(packName)}`,
|
url: `/api/pleroma/emoji/packs/files?name=${packName}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: authHeaders(token),
|
headers: authHeaders(token),
|
||||||
data
|
data
|
||||||
|
@ -28,7 +28,7 @@ export function addressOfEmojiInPack(host, packName, name) {
|
||||||
export async function createPack(host, token, packName) {
|
export async function createPack(host, token, packName) {
|
||||||
return await request({
|
return await request({
|
||||||
baseURL: baseName(host),
|
baseURL: baseName(host),
|
||||||
url: `/api/pleroma/emoji/packs/create?name=${encodeUri(packName)}`,
|
url: `/api/pleroma/emoji/pack?name=${packName}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: authHeaders(token)
|
headers: authHeaders(token)
|
||||||
})
|
})
|
||||||
|
@ -37,7 +37,7 @@ export async function createPack(host, token, packName) {
|
||||||
export async function deleteEmojiFile(packName, shortcode, host, token) {
|
export async function deleteEmojiFile(packName, shortcode, host, token) {
|
||||||
return await request({
|
return await request({
|
||||||
baseURL: baseName(host),
|
baseURL: baseName(host),
|
||||||
url: `/api/pleroma/emoji/packs/files?name=${encodeUri(packName)}&shortcode=${shortcode}`,
|
url: `/api/pleroma/emoji/packs/files?name=${packName}&shortcode=${shortcode}`,
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
headers: authHeaders(token)
|
headers: authHeaders(token)
|
||||||
})
|
})
|
||||||
|
@ -46,7 +46,7 @@ export async function deleteEmojiFile(packName, shortcode, host, token) {
|
||||||
export async function deletePack(host, token, packName) {
|
export async function deletePack(host, token, packName) {
|
||||||
return await request({
|
return await request({
|
||||||
baseURL: baseName(host),
|
baseURL: baseName(host),
|
||||||
url: `/api/pleroma/emoji/packs/delete?name=${encodeUri(packName)}`,
|
url: `/api/pleroma/emoji/pack?name=${packName}`,
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
headers: authHeaders(token)
|
headers: authHeaders(token)
|
||||||
})
|
})
|
||||||
|
@ -68,7 +68,7 @@ export async function downloadFrom(instanceAddress, packName, as, host, token) {
|
||||||
export async function fetchPack(packName, page, pageSize, host, token) {
|
export async function fetchPack(packName, page, pageSize, host, token) {
|
||||||
return await request({
|
return await request({
|
||||||
baseURL: baseName(host),
|
baseURL: baseName(host),
|
||||||
url: `/api/pleroma/emoji/packs/show?name=${encodeUri(packName)}&page=${page}&page_size=${pageSize}`,
|
url: `/api/pleroma/emoji/pack?name=${packName}&page=${page}&page_size=${pageSize}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
headers: authHeaders(token)
|
headers: authHeaders(token)
|
||||||
})
|
})
|
||||||
|
@ -113,7 +113,7 @@ export async function reloadEmoji(host, token) {
|
||||||
export async function savePackMetadata(host, token, packName, metadata) {
|
export async function savePackMetadata(host, token, packName, metadata) {
|
||||||
return await request({
|
return await request({
|
||||||
baseURL: baseName(host),
|
baseURL: baseName(host),
|
||||||
url: `/api/pleroma/emoji/packs/update?name=${encodeUri(packName)}`,
|
url: `/api/pleroma/emoji/pack?name=${packName}`,
|
||||||
method: 'patch',
|
method: 'patch',
|
||||||
headers: authHeaders(token),
|
headers: authHeaders(token),
|
||||||
data: { metadata },
|
data: { metadata },
|
||||||
|
@ -124,7 +124,7 @@ export async function savePackMetadata(host, token, packName, metadata) {
|
||||||
export async function updateEmojiFile(packName, shortcode, newShortcode, newFilename, force, host, token) {
|
export async function updateEmojiFile(packName, shortcode, newShortcode, newFilename, force, host, token) {
|
||||||
return await request({
|
return await request({
|
||||||
baseURL: baseName(host),
|
baseURL: baseName(host),
|
||||||
url: `/api/pleroma/emoji/packs/files?name=${encodeUri(packName)}`,
|
url: `/api/pleroma/emoji/packs/files?name=${packName}`,
|
||||||
method: 'patch',
|
method: 'patch',
|
||||||
headers: authHeaders(token),
|
headers: authHeaders(token),
|
||||||
data: { shortcode, new_shortcode: newShortcode, new_filename: newFilename, force }
|
data: { shortcode, new_shortcode: newShortcode, new_filename: newFilename, force }
|
||||||
|
|
Loading…
Reference in a new issue