mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
refactor(server): rename settings to user-settings (#11161)
This commit is contained in:
@@ -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';
|
||||
|
||||
+10
-5
@@ -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)
|
||||
}
|
||||
`,
|
||||
Reference in New Issue
Block a user