🗑️ Remove account

This commit is contained in:
2024-11-03 01:53:57 +08:00
parent 94b777a3e4
commit 2d119826fe
16 changed files with 57 additions and 91 deletions

View File

@ -7,7 +7,6 @@ import (
"git.solsynth.dev/hypernet/nexus/pkg/proto"
"git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
"git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
)
func (v *Server) BroadcastEvent(ctx context.Context, in *proto.EventInfo) (*proto.EventResponse, error) {
@ -35,10 +34,6 @@ func (v *Server) BroadcastEvent(ctx context.Context, in *proto.EventInfo) (*prot
tx.Delete(model, "account_id = ?", numericId)
}
}
if tx.Delete(&models.Account{}, "id = ?", numericId).Error != nil {
tx.Rollback()
break
}
tx.Commit()
}
}