feat(editor): fixed toolbar preference

This commit is contained in:
Philipinho
2026-05-09 12:53:20 +01:00
parent 2d8b470495
commit a92fa2334b
30 changed files with 1384 additions and 116 deletions
@@ -22,6 +22,10 @@ export class UpdateUserDto extends PartialType(
@IsIn(['read', 'edit'])
pageEditMode: string;
@IsOptional()
@IsBoolean()
editorToolbar: boolean;
@IsOptional()
@IsString()
locale: string;
@@ -61,6 +61,14 @@ export class UserService {
);
}
if (typeof updateUserDto.editorToolbar !== 'undefined') {
return this.userRepo.updatePreference(
userId,
'editorToolbar',
updateUserDto.editorToolbar,
);
}
const notificationSettings: Record<string, NotificationSettingKey> = {
notificationPageUpdates: 'page.updated',
notificationPageUserMention: 'page.userMention',