🐛 Fix new realm owner missing permissions

This commit is contained in:
2024-05-05 22:03:51 +08:00
parent ec911b828e
commit 35f9580499
3 changed files with 35 additions and 32 deletions

View File

@ -59,7 +59,7 @@ func GetRealmWithAlias(alias string) (models.Realm, error) {
func NewRealm(realm models.Realm, user models.Account) (models.Realm, error) {
realm.Members = []models.RealmMember{
{AccountID: user.ID},
{AccountID: user.ID, PowerLevel: 100},
}
err := database.C.Save(&realm).Error