separate authenticated endpoints to user.js

This commit is contained in:
Henry Jameson 2026-06-17 14:26:41 +03:00
commit ebf7040662
36 changed files with 1082 additions and 1055 deletions

View file

@ -11,11 +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/api.service.js'
import { chats, deleteChatMessage, readChat } from 'src/services/api/chats.js'
const emptyChatList = () => ({
data: [],

View file

@ -1,4 +1,4 @@
import { markNotificationsAsSeen } from '../services/api/api.service.js'
import { markNotificationsAsSeen } from '../services/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/api.service.js'
import { dismissNotification } from 'src/services/api/user.js'
const emptyNotifications = () => ({
desktopNotificationSilence: true,

View file

@ -5,7 +5,7 @@ import { useOAuthStore } from 'src/stores/oauth.js'
import {
updateNotificationSettings,
updateProfile,
} from 'src/services/api/api.service.js'
} from 'src/services/api/user.js'
const defaultApi = ({ rootState, commit }, { path, value }) => {
const params = {}

View file

@ -13,10 +13,11 @@ import {
slice,
} from 'lodash'
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
import { useInterfaceStore } from 'src/stores/interface.js'
import { useOAuthStore } from 'src/stores/oauth.js'
import {
bookmarkStatus,
deleteStatus,
favorite,
fetchEmojiReactions,
fetchFavoritedByUsers,
fetchPinnedStatuses,
@ -25,22 +26,23 @@ import {
fetchStatus,
fetchStatusHistory,
fetchStatusSource,
search2,
} from 'src/services/api/api.service.js'
import {
bookmarkStatus,
deleteStatus,
favorite,
muteConversation,
pinOwnStatus,
reactWithEmoji,
retweet,
search2,
unbookmarkStatus,
unfavorite,
unmuteConversation,
unpinOwnStatus,
unreactWithEmoji,
unretweet,
} from '../services/api/api.service.js'
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
import { useInterfaceStore } from 'src/stores/interface.js'
import { useOAuthStore } from 'src/stores/oauth.js'
} from 'src/services/api/user.js'
const emptyTl = (userId = 0) => ({
statuses: [],

View file

@ -32,21 +32,23 @@ import { useSyncConfigStore } from 'src/stores/sync_config.js'
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
import {
fetchBlocks,
fetchDomainMutes,
fetchFollowers,
fetchFriends,
fetchMutes,
fetchUser,
fetchUserByName,
fetchUserInLists,
fetchUserRelationship,
followUser,
getCaptcha,
muteUser,
searchUsers,
verifyCredentials,
} from 'src/services/api/api.service.js'
import {
fetchBlocks,
fetchDomainMutes,
fetchMutes,
fetchUserInLists,
fetchUserRelationship,
followUser,
muteUser,
} from 'src/services/api/user.js'
// TODO: Unify with mergeOrAdd in statuses.js
export const mergeOrAdd = (arr, obj, item) => {