chore: add rest api return (#3864)
This commit is contained in:
parent
7a9cdde474
commit
abd9722133
|
@ -111,6 +111,7 @@ export interface INotificationPreferences {
|
|||
desktopNotifications: TNotifications;
|
||||
pushNotifications: TNotifications;
|
||||
emailNotificationMode?: 'mentions' | 'nothing';
|
||||
language?: string;
|
||||
}
|
||||
|
||||
export interface IUserPreferences {
|
||||
|
|
|
@ -26,7 +26,7 @@ export type UsersEndpoints = {
|
|||
};
|
||||
};
|
||||
'users.setPreferences': {
|
||||
POST: (params: { userId: IUser['_id']; data: Partial<INotificationPreferences> }) => {
|
||||
POST: (params: { userId?: IUser['_id']; data: Partial<INotificationPreferences> }) => {
|
||||
user: IUserPreferences;
|
||||
success: boolean;
|
||||
};
|
||||
|
|
|
@ -551,10 +551,8 @@ export const saveUserProfile = (data: any, customFields?: any): any =>
|
|||
// @ts-ignore
|
||||
sdk.post('users.updateOwnBasicInfo', { data, customFields });
|
||||
|
||||
export const saveUserPreferences = (data: any): any =>
|
||||
export const saveUserPreferences = (data: Partial<INotificationPreferences>) =>
|
||||
// RC 0.62.0
|
||||
// TODO: missing definitions from server
|
||||
// @ts-ignore
|
||||
sdk.post('users.setPreferences', { data });
|
||||
|
||||
export const saveNotificationSettings = (roomId: string, notifications: any): any =>
|
||||
|
|
Loading…
Reference in New Issue