refactor: Update typings of /me/settings and /users/:id/settings endpoints (no-changelog) (#9620)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { UpdateGlobalRolePayload } from '@/api/users';
|
||||
import type { IUpdateUserSettingsReqPayload, UpdateGlobalRolePayload } from '@/api/users';
|
||||
import {
|
||||
changePassword,
|
||||
deleteUser,
|
||||
@@ -246,7 +246,7 @@ export const useUsersStore = defineStore(STORES.USERS, {
|
||||
const user = await updateCurrentUser(rootStore.getRestApiContext, params);
|
||||
this.addUsers([user]);
|
||||
},
|
||||
async updateUserSettings(settings: IUserResponse['settings']): Promise<void> {
|
||||
async updateUserSettings(settings: IUpdateUserSettingsReqPayload): Promise<void> {
|
||||
const rootStore = useRootStore();
|
||||
const updatedSettings = await updateCurrentUserSettings(
|
||||
rootStore.getRestApiContext,
|
||||
@@ -259,7 +259,7 @@ export const useUsersStore = defineStore(STORES.USERS, {
|
||||
},
|
||||
async updateOtherUserSettings(
|
||||
userId: string,
|
||||
settings: IUserResponse['settings'],
|
||||
settings: IUpdateUserSettingsReqPayload,
|
||||
): Promise<void> {
|
||||
const rootStore = useRootStore();
|
||||
const updatedSettings = await updateOtherUserSettings(
|
||||
|
||||
Reference in New Issue
Block a user