fix emoji tab
This commit is contained in:
parent
0d9709825f
commit
7999f2d34b
3 changed files with 11 additions and 9 deletions
|
|
@ -159,7 +159,7 @@ import {
|
|||
addNewEmojiFile,
|
||||
deleteEmojiFile,
|
||||
updateEmojiFile,
|
||||
} from 'src/services/api/api.service.js'
|
||||
} from 'src/services/api/admin.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -548,11 +548,15 @@ export const useAdminSettingsStore = defineStore('adminSettings', {
|
|||
importEmojiFromFS() {
|
||||
return importEmojiFromFS({ credentials: useCredentialsStore().current })
|
||||
},
|
||||
listEmojiPacks() {
|
||||
return listEmojiPacks({ credentials: useCredentialsStore().current })
|
||||
listEmojiPacks(params) {
|
||||
return listEmojiPacks({
|
||||
...params,
|
||||
credentials: useCredentialsStore().current
|
||||
})
|
||||
},
|
||||
listRemoteEmojiPacks() {
|
||||
listRemoteEmojiPacks(params) {
|
||||
return listRemoteEmojiPacks({
|
||||
...params,
|
||||
credentials: useCredentialsStore().current,
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -188,8 +188,8 @@ export const useEmojiStore = defineStore('emoji', {
|
|||
this.adminPacksLocalLoading = true
|
||||
this.adminPacksLocal = await this.getAdminPacks(
|
||||
useInstanceStore().server,
|
||||
() =>
|
||||
listEmojiPacks({
|
||||
(params) => listEmojiPacks({
|
||||
...params,
|
||||
credentials: useCredentialsStore().current,
|
||||
}),
|
||||
)
|
||||
|
|
@ -208,7 +208,6 @@ export const useEmojiStore = defineStore('emoji', {
|
|||
page: 1,
|
||||
pageSize: 0,
|
||||
})
|
||||
.then((data) => data.json())
|
||||
.then((data) => {
|
||||
if (data.error !== undefined) {
|
||||
return Promise.reject(data.error)
|
||||
|
|
@ -223,7 +222,6 @@ export const useEmojiStore = defineStore('emoji', {
|
|||
page: i,
|
||||
pageSize,
|
||||
})
|
||||
.then((data) => data.json())
|
||||
.then((pageData) => {
|
||||
if (pageData.error !== undefined) {
|
||||
return Promise.reject(pageData.error)
|
||||
|
|
@ -249,7 +247,7 @@ export const useEmojiStore = defineStore('emoji', {
|
|||
}, {})
|
||||
})
|
||||
.catch((data) => {
|
||||
this.displayError(data)
|
||||
console.error(data)
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue