feat: edit server config online (#980)

* feat: edit server config online

* clean

* refactor

* generate template

* fix deadlocks

* fix
This commit is contained in:
UUBulb authored and GitHub committed 2025-01-31 13:33:53 +08:00
1 parent 2a6206f1a9
commit b75a49c3c6
10 files changed
+227 -86

No files matched your search

+1 -3
View File
@@ -67,9 +67,7 @@ func (a *authHandler) Check(ctx context.Context) (uint64, error) {
if err := singleton.DB.Create(&s).Error; err != nil {
return 0, status.Error(codes.Unauthenticated, err.Error())
}
s.Host = &model.Host{}
s.State = &model.HostState{}
s.GeoIP = &model.GeoIP{}
model.InitServer(&s)
singleton.ServerLock.Lock()
singleton.ServerList[s.ID] = &s