refactor(server): rename settings to user-settings (#11161)

This commit is contained in:
fengmk2
2025-03-25 08:47:27 +00:00
parent dda3103d1b
commit a8c86c5ede
17 changed files with 110 additions and 105 deletions
@@ -2,9 +2,9 @@ export * from './blobs';
export * from './invite';
export * from './notification';
export * from './permission';
export * from './settings';
export * from './testing-app';
export * from './testing-module';
export * from './user';
export * from './user-settings';
export * from './utils';
export * from './workspace';
@@ -1,7 +1,12 @@
import type { SettingsType, UpdateSettingsInput } from '../../core/user/types';
import type {
UpdateUserSettingsInput,
UserSettingsType,
} from '../../core/user/types';
import type { TestingApp } from './testing-app';
export async function getSettings(app: TestingApp): Promise<SettingsType> {
export async function getUserSettings(
app: TestingApp
): Promise<UserSettingsType> {
const res = await app.gql(
`
query settings {
@@ -17,13 +22,13 @@ export async function getSettings(app: TestingApp): Promise<SettingsType> {
return res.currentUser.settings;
}
export async function updateSettings(
export async function updateUserSettings(
app: TestingApp,
input: UpdateSettingsInput
input: UpdateUserSettingsInput
): Promise<boolean> {
const res = await app.gql(
`
mutation updateSettings($input: UpdateSettingsInput!) {
mutation updateUserSettings($input: UpdateUserSettingsInput!) {
updateSettings(input: $input)
}
`,