src/services/api -> src/api
This commit is contained in:
parent
baf283123e
commit
c81813064b
50 changed files with 74 additions and 74 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { parseChat } from '../entity_normalizer/entity_normalizer.service.js'
|
||||
import { parseChat } from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||
import { paramsString, promisedRequest } from './helpers.js'
|
||||
|
||||
const PLEROMA_CHATS_URL = '/api/v1/pleroma/chats'
|
||||
|
|
@ -8,7 +8,7 @@ import {
|
|||
parseSource,
|
||||
parseStatus,
|
||||
parseUser,
|
||||
} from '../entity_normalizer/entity_normalizer.service.js'
|
||||
} from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||
import { paramsString, promisedRequest } from './helpers.js'
|
||||
|
||||
import { RegistrationError, StatusCodeError } from 'src/services/errors/errors'
|
||||
|
|
@ -6,7 +6,7 @@ import {
|
|||
parseSource,
|
||||
parseStatus,
|
||||
parseUser,
|
||||
} from '../entity_normalizer/entity_normalizer.service.js'
|
||||
} from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||
import { paramsString, promisedRequest } from './helpers.js'
|
||||
import { fetchFriends, MASTODON_STATUS_URL } from './public.js'
|
||||
|
||||
|
|
@ -4,7 +4,7 @@ import { useBookmarkFoldersStore } from 'src/stores/bookmark_folders.js'
|
|||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { fetchBookmarkFolders } from 'src/services/api/user.js'
|
||||
import { fetchBookmarkFolders } from 'src/api/user.js'
|
||||
|
||||
const BookmarkFolderEdit = {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { mapGetters, mapState } from 'vuex'
|
|||
import ChatMessage from 'src/components/chat_message/chat_message.vue'
|
||||
import ChatTitle from 'src/components/chat_title/chat_title.vue'
|
||||
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
|
||||
import { WSConnectionStatus } from '../../services/api/public.js'
|
||||
import { WSConnectionStatus } from 'src/api/public.js'
|
||||
import chatService from '../../services/chat_service/chat_service.js'
|
||||
import { buildFakeMessage } from '../../services/chat_utils/chat_utils.js'
|
||||
import { promiseInterval } from '../../services/promise_interval/promise_interval.js'
|
||||
|
|
@ -23,7 +23,7 @@ import {
|
|||
chatMessages,
|
||||
getOrCreateChat,
|
||||
sendChatMessage,
|
||||
} from 'src/services/api/chats.js'
|
||||
} from 'src/api/chats.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faChevronDown, faChevronLeft } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
|||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { chats } from 'src/services/api/chats.js'
|
||||
import { chats } from 'src/api/chats.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faChevronLeft, faSearch } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ import { mapState } from 'vuex'
|
|||
import QuickFilterSettings from 'src/components/quick_filter_settings/quick_filter_settings.vue'
|
||||
import QuickViewSettings from 'src/components/quick_view_settings/quick_view_settings.vue'
|
||||
import ThreadTree from 'src/components/thread_tree/thread_tree.vue'
|
||||
import { WSConnectionStatus } from '../../services/api/public.js'
|
||||
import { WSConnectionStatus } from 'src/api/public.js'
|
||||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { fetchConversation, fetchStatus } from 'src/services/api/public.js'
|
||||
import { fetchConversation, fetchStatus } from 'src/api/public.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
|||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { approveUser, denyUser } from 'src/services/api/user.js'
|
||||
import { approveUser, denyUser } from 'src/api/user.js'
|
||||
|
||||
const FollowRequestCard = {
|
||||
props: ['user'],
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
|||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||
|
||||
import { approveUser, denyUser } from 'src/services/api/user.js'
|
||||
import { approveUser, denyUser } from 'src/api/user.js'
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { fetchUser } from 'src/services/api/public.js'
|
||||
import { fetchUser } from 'src/api/public.js'
|
||||
|
||||
const RemoteUserResolver = {
|
||||
data: () => ({
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ import {
|
|||
addNewEmojiFile,
|
||||
deleteEmojiFile,
|
||||
updateEmojiFile,
|
||||
} from 'src/services/api/admin.js'
|
||||
} from 'src/api/admin.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
import Preview from './old_theme_tab/theme_preview.vue'
|
||||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { normalizeThemeData, useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { updateProfileImages } from 'src/services/api/user.js'
|
||||
import { updateProfileImages } from 'src/api/user.js'
|
||||
import { newImporter } from 'src/services/export_import/export_import.js'
|
||||
import {
|
||||
adoptStyleSheets,
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ import IntegerSetting from '../helpers/integer_setting.vue'
|
|||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { updateProfile } from 'src/services/api/user.js'
|
||||
import { updateProfile } from 'src/api/user.js'
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
import { cacheKey, clearCache, emojiCacheKey } from 'src/services/sw/sw.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import {
|
|||
importFollows,
|
||||
importMutes,
|
||||
listBackups,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
|
||||
const DataImportExportTab = {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ import FloatSetting from '../helpers/float_setting.vue'
|
|||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { updateProfile } from 'src/services/api/user.js'
|
||||
import { updateProfile } from 'src/api/user.js'
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
||||
const GeneralTab = {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { useInstanceStore } from 'src/stores/instance.js'
|
|||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useOAuthTokensStore } from 'src/stores/oauth_tokens.js'
|
||||
|
||||
import { importBlocks, importFollows } from 'src/services/api/user.js'
|
||||
import { importBlocks, importFollows } from 'src/api/user.js'
|
||||
|
||||
const MutesAndBlocks = {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { updateNotificationSettings } from 'src/services/api/user.js'
|
||||
import { updateNotificationSettings } from 'src/api/user.js'
|
||||
|
||||
const NotificationsTab = {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { updateProfile } from 'src/services/api/user.js'
|
||||
import { updateProfile } from 'src/api/user.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
mfaConfirmOTP,
|
||||
mfaSetupOTP,
|
||||
settingsMFA,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
|
||||
const Mfa = {
|
||||
data: () => ({
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import Confirm from './confirm.vue'
|
|||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { mfaDisableOTP } from 'src/services/api/user.js'
|
||||
import { mfaDisableOTP } from 'src/api/user.js'
|
||||
|
||||
export default {
|
||||
props: ['settings'],
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import {
|
|||
deleteAlias,
|
||||
listAliases,
|
||||
moveAccount,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
||||
const SecurityTab = {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import { useOAuthStore } from 'src/stores/oauth.js'
|
|||
import { usePostStatusStore } from 'src/stores/post_status'
|
||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||
|
||||
import { updateProfile } from 'src/services/api/user.js'
|
||||
import { updateProfile } from 'src/api/user.js'
|
||||
import { propsToNative } from 'src/services/attributes_helper/attributes_helper.service.js'
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import UserLink from 'src/components/user_link/user_link.vue'
|
|||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useReportsStore } from 'src/stores/reports.js'
|
||||
|
||||
import { reportUser } from 'src/services/api/user.js'
|
||||
import { reportUser } from 'src/api/user.js'
|
||||
|
||||
const UserReportingModal = {
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import FollowCard from 'src/components/follow_card/follow_card.vue'
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { fetchUser, suggestions } from 'src/services/api/public.js'
|
||||
import { fetchUser, suggestions } from 'src/api/public.js'
|
||||
|
||||
const WhoToFollow = {
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { useInstanceStore } from 'src/stores/instance.js'
|
|||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { fetchUser, suggestions } from 'src/services/api/public.js'
|
||||
import { fetchUser, suggestions } from 'src/api/public.js'
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
|
||||
function showWhoToFollow(panel, reply) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Socket } from 'phoenix'
|
||||
|
||||
import { WSConnectionStatus } from '../services/api/public.js'
|
||||
import { WSConnectionStatus } from 'src/api/public.js'
|
||||
import { maybeShowChatNotification } from '../services/chat_utils/chat_utils.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
|
|
@ -13,7 +13,7 @@ import {
|
|||
fetchTimeline,
|
||||
getMastodonSocketURI,
|
||||
ProcessedWS,
|
||||
} from 'src/services/api/public.js'
|
||||
} from 'src/api/public.js'
|
||||
import followRequestFetcher from 'src/services/follow_request_fetcher/follow_request_fetcher.service'
|
||||
import notificationsFetcher from 'src/services/notifications_fetcher/notifications_fetcher.service.js'
|
||||
import timelineFetcher from 'src/services/timeline_fetcher/timeline_fetcher.service.js'
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { promiseInterval } from '../services/promise_interval/promise_interval.j
|
|||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { chats, deleteChatMessage, readChat } from 'src/services/api/chats.js'
|
||||
import { chats, deleteChatMessage, readChat } from 'src/api/chats.js'
|
||||
|
||||
const emptyChatList = () => ({
|
||||
data: [],
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { markNotificationsAsSeen } from '../services/api/user.js'
|
||||
import { markNotificationsAsSeen } from 'src/api/user.js'
|
||||
import {
|
||||
closeAllDesktopNotifications,
|
||||
closeDesktopNotification,
|
||||
|
|
@ -15,7 +15,7 @@ import { useOAuthStore } from 'src/stores/oauth.js'
|
|||
import { useReportsStore } from 'src/stores/reports.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { dismissNotification } from 'src/services/api/user.js'
|
||||
import { dismissNotification } from 'src/api/user.js'
|
||||
|
||||
const emptyNotifications = () => ({
|
||||
desktopNotificationSilence: true,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { useOAuthStore } from 'src/stores/oauth.js'
|
|||
import {
|
||||
updateNotificationSettings,
|
||||
updateProfile,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
|
||||
const defaultApi = ({ rootState, commit }, { path, value }) => {
|
||||
const params = {}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import {
|
|||
fetchStatusHistory,
|
||||
fetchStatusSource,
|
||||
search2,
|
||||
} from 'src/services/api/public.js'
|
||||
} from 'src/api/public.js'
|
||||
import {
|
||||
bookmarkStatus,
|
||||
deleteStatus,
|
||||
|
|
@ -42,7 +42,7 @@ import {
|
|||
unpinOwnStatus,
|
||||
unreactWithEmoji,
|
||||
unretweet,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
|
||||
const emptyTl = (userId = 0) => ({
|
||||
statuses: [],
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
uniq,
|
||||
} from 'lodash'
|
||||
|
||||
import { register } from '../services/api/public.js'
|
||||
import { register } from 'src/api/public.js'
|
||||
import oauthApi from '../services/new_api/oauth.js'
|
||||
import {
|
||||
registerPushNotifications,
|
||||
|
|
@ -39,7 +39,7 @@ import {
|
|||
getCaptcha,
|
||||
searchUsers,
|
||||
verifyCredentials,
|
||||
} from 'src/services/api/public.js'
|
||||
} from 'src/api/public.js'
|
||||
import {
|
||||
fetchBlocks,
|
||||
fetchDomainMutes,
|
||||
|
|
@ -48,7 +48,7 @@ import {
|
|||
fetchUserRelationship,
|
||||
followUser,
|
||||
muteUser,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
|
||||
// TODO: Unify with mergeOrAdd in statuses.js
|
||||
export const mergeOrAdd = (arr, obj, item) => {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {
|
|||
fetchUserRelationship,
|
||||
followUser,
|
||||
unfollowUser,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
|
||||
const fetchRelationship = (attempt, userId, store) =>
|
||||
new Promise((resolve, reject) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { fetchFollowRequests } from 'src/services/api/user.js'
|
||||
import { fetchFollowRequests } from 'src/api/user.js'
|
||||
import { promiseInterval } from 'src/services/promise_interval/promise_interval.js'
|
||||
|
||||
const fetchAndUpdate = ({ store, credentials }) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { fetchTimeline } from '../api/public.js'
|
||||
import { fetchTimeline } from 'src/api/public.js'
|
||||
import { promiseInterval } from '../promise_interval/promise_interval.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {
|
|||
postStatus as apiPostStatus,
|
||||
setMediaDescription as apiSetMediaDescription,
|
||||
uploadMedia as apiUploadMedia,
|
||||
} from 'src/services/api/user.js'
|
||||
} from 'src/api/user.js'
|
||||
|
||||
const postStatus = ({
|
||||
store,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { camelCase } from 'lodash'
|
||||
|
||||
import { fetchTimeline } from '../api/public.js'
|
||||
import { fetchTimeline } from 'src/api/public.js'
|
||||
import { promiseInterval } from '../promise_interval/promise_interval.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { paramsString } from 'src/services/api/helpers.js'
|
||||
import { paramsString } from 'src/api/helpers.js'
|
||||
|
||||
describe('API Helpers', () => {
|
||||
describe.only('paramsString', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue