src/services/api -> src/api
This commit is contained in:
parent
baf283123e
commit
c81813064b
50 changed files with 74 additions and 74 deletions
|
|
@ -31,8 +31,8 @@ import {
|
|||
setUsersRight,
|
||||
setUsersSuggestionStatus,
|
||||
setUsersTags,
|
||||
} from 'src/services/api/admin.js'
|
||||
import { listEmojiPacks } from 'src/services/api/public.js'
|
||||
} from 'src/api/admin.js'
|
||||
import { listEmojiPacks } from 'src/api/public.js'
|
||||
import { parseStatus } from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||
|
||||
export const defaultState = {
|
||||
|
|
@ -551,7 +551,7 @@ export const useAdminSettingsStore = defineStore('adminSettings', {
|
|||
listEmojiPacks(params) {
|
||||
return listEmojiPacks({
|
||||
...params,
|
||||
credentials: useOAuthStore().token,
|
||||
credentials: useOAuthStore().token
|
||||
})
|
||||
},
|
||||
listRemoteEmojiPacks(params) {
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import {
|
|||
deleteAnnouncement,
|
||||
editAnnouncement,
|
||||
postAnnouncement,
|
||||
} from 'src/services/api/admin.js'
|
||||
import { getAnnouncements } from 'src/services/api/public.js'
|
||||
import { dismissAnnouncement } from 'src/services/api/user.js'
|
||||
} from 'src/api/admin.js'
|
||||
import { getAnnouncements } from 'src/api/public.js'
|
||||
import { dismissAnnouncement } from 'src/api/user.js'
|
||||
|
||||
const FETCH_ANNOUNCEMENT_INTERVAL_MS = 1000 * 60 * 5
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {
|
|||
deleteBookmarkFolder,
|
||||
fetchBookmarkFolders,
|
||||
updateBookmarkFolder,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
import { promiseInterval } from 'src/services/promise_interval/promise_interval.js'
|
||||
|
||||
export const useBookmarkFoldersStore = defineStore('bookmarkFolders', {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { merge } from 'lodash'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
|
||||
import { ensureFinalFallback } from 'src/i18n/languages.js'
|
||||
import { listEmojiPacks } from 'src/services/api/public.js'
|
||||
import { listEmojiPacks } from 'src/api/public.js'
|
||||
|
||||
import { annotationsLoader } from 'virtual:pleroma-fe/emoji-annotations'
|
||||
|
||||
|
|
@ -188,8 +188,7 @@ export const useEmojiStore = defineStore('emoji', {
|
|||
this.adminPacksLocalLoading = true
|
||||
this.adminPacksLocal = await this.getAdminPacks(
|
||||
useInstanceStore().server,
|
||||
(params) =>
|
||||
listEmojiPacks({
|
||||
(params) => listEmojiPacks({
|
||||
...params,
|
||||
credentials: useOAuthStore().token,
|
||||
}),
|
||||
|
|
@ -222,13 +221,14 @@ export const useEmojiStore = defineStore('emoji', {
|
|||
instance,
|
||||
page: i,
|
||||
pageSize,
|
||||
}).then((pageData) => {
|
||||
if (pageData.error !== undefined) {
|
||||
return Promise.reject(pageData.error)
|
||||
}
|
||||
})
|
||||
.then((pageData) => {
|
||||
if (pageData.error !== undefined) {
|
||||
return Promise.reject(pageData.error)
|
||||
}
|
||||
|
||||
return pageData.packs
|
||||
}),
|
||||
return pageData.packs
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
LOCAL_DEFAULT_CONFIG_DEFINITIONS,
|
||||
validateSetting,
|
||||
} from '../modules/default_config_state.js'
|
||||
import { fetchKnownDomains } from '../services/api/public.js'
|
||||
import { fetchKnownDomains } from 'src/api/public.js'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
getListAccounts,
|
||||
removeAccountsFromList,
|
||||
updateList,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
import { promiseInterval } from 'src/services/promise_interval/promise_interval.js'
|
||||
|
||||
export const useListsStore = defineStore('lists', {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
|
|||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { fetchOAuthTokens, revokeOAuthToken } from 'src/services/api/user.js'
|
||||
import { fetchOAuthTokens, revokeOAuthToken } from 'src/api/user.js'
|
||||
|
||||
export const useOAuthTokensStore = defineStore('oauthTokens', {
|
||||
state: () => ({
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { defineStore } from 'pinia'
|
|||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { fetchPoll } from 'src/services/api/public.js'
|
||||
import { vote } from 'src/services/api/user.js'
|
||||
import { fetchPoll } from 'src/api/public.js'
|
||||
import { vote } from 'src/api/user.js'
|
||||
|
||||
export const usePollsStore = defineStore('polls', {
|
||||
state: () => ({
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { defineStore } from 'pinia'
|
|||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { setReportState } from 'src/services/api/admin.js'
|
||||
import { setReportState } from 'src/api/admin.js'
|
||||
|
||||
export const useReportsStore = defineStore('reports', {
|
||||
state: () => ({
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ import { toRaw } from 'vue'
|
|||
|
||||
import { CURRENT_UPDATE_COUNTER } from 'src/components/update_notification/update_notification.js'
|
||||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { storage } from 'src/lib/storage.js'
|
||||
import {
|
||||
|
|
@ -32,7 +32,7 @@ import {
|
|||
validateSetting,
|
||||
} from 'src/modules/default_config_state.js'
|
||||
import { oldDefaultConfigSync } from 'src/modules/old_default_config_state.js'
|
||||
import { updateProfileJSON } from 'src/services/api/user.js'
|
||||
import { updateProfileJSON } from 'src/api/user.js'
|
||||
|
||||
export const VERSION = 2
|
||||
export const NEW_USER_DATE = new Date('2026-03-16') // date of writing this, basically
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import { toRaw } from 'vue'
|
|||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { storage } from 'src/lib/storage.js'
|
||||
import { updateProfileJSON } from 'src/services/api/user.js'
|
||||
import { updateProfileJSON } from 'src/api/user.js'
|
||||
|
||||
export const NEW_USER_DATE = new Date('2022-08-04') // date of writing this, basically
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue