🗃️ Update schema to clean up unused code

This commit is contained in:
2025-10-23 01:01:19 +08:00
parent e6aa61b03b
commit 266b9e36e2
16 changed files with 4760 additions and 401 deletions

View File

@@ -358,9 +358,7 @@ public class PublisherController(
if (realm == null) return NotFound("Realm not found");
var accountId = Guid.Parse(currentUser.Id);
var isAdmin = await db.RealmMembers
.AnyAsync(m =>
m.RealmId == realm.Id && m.AccountId == accountId && m.Role >= RealmMemberRole.Moderator);
var isAdmin = await remoteRealmService.IsMemberWithRole(realm.Id, accountId, [RealmMemberRole.Moderator]);
if (!isAdmin)
return StatusCode(403, "You need to be a moderator of the realm to create an organization publisher");