Added disabled in the group profile dto.

This commit is contained in:
cake
2025-12-07 21:53:01 +01:00
parent 7748fa6eac
commit 918c5e7d5d
2 changed files with 80 additions and 78 deletions

View File

@@ -852,8 +852,9 @@ public partial class LightlessHub
{ {
GroupGID = dto.Group.GID, GroupGID = dto.Group.GID,
Group = group, Group = group,
ProfileDisabled = false, ProfileDisabled = dto.IsDisabled ?? false,
IsNSFW = dto.IsNsfw ?? false, IsNSFW = dto.IsNsfw ?? false,
}; };
groupProfileDb.UpdateProfileFromDto(dto, sanitizedProfileImage, sanitizedBannerImage); groupProfileDb.UpdateProfileFromDto(dto, sanitizedProfileImage, sanitizedBannerImage);

View File

@@ -22,6 +22,7 @@ public static class Extensions
if (dto.Tags != null) profile.Tags = dto.Tags; if (dto.Tags != null) profile.Tags = dto.Tags;
if (dto.Description != null) profile.Description = dto.Description; if (dto.Description != null) profile.Description = dto.Description;
if (dto.IsNsfw.HasValue) profile.IsNSFW = dto.IsNsfw.Value; if (dto.IsNsfw.HasValue) profile.IsNSFW = dto.IsNsfw.Value;
if (dto.IsDisabled.HasValue) profile.ProfileDisabled = dto.IsDisabled.Value;
} }
public static void UpdateProfileFromDto(this UserProfileData profile, UserProfileDto dto, string? base64PictureString = null, string? base64BannerString = null) public static void UpdateProfileFromDto(this UserProfileData profile, UserProfileDto dto, string? base64PictureString = null, string? base64BannerString = null)