Add moderation/permission info to /api/v1/user (#761)

* Add moderation / permission info to /api/v1/user

* Consolidate everything into a single PermissionLevel reference
This commit is contained in:
koko 2023-05-04 17:35:15 -04:00 committed by GitHub
parent 9deff7ce63
commit 613984c69d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,7 @@ public struct ApiUser
public PrivacyType LevelVisibility { get; set; }
public PrivacyType ProfileVisibility { get; set; }
public bool CommentsEnabled { get; set; }
public PermissionLevel PermissionLevel { get; set; }
public static ApiUser CreateFromEntity(UserEntity entity) =>
new()
@ -38,5 +39,6 @@ public struct ApiUser
LevelVisibility = entity.LevelVisibility,
ProfileVisibility = entity.ProfileVisibility,
CommentsEnabled = entity.CommentsEnabled,
PermissionLevel = entity.PermissionLevel,
};
}