fix: nullable server id in activity log and fix preset logging

This commit is contained in:
2026-03-26 22:48:59 +01:00
parent f23f276ee5
commit f2580b6de0
6 changed files with 31 additions and 14 deletions

View File

@@ -21,7 +21,7 @@ const (
type ActivityLog struct {
ID uuid.UUID `json:"id" gorm:"type:uuid;primary_key;"`
ServerID uuid.UUID `json:"serverId" gorm:"not null;type:uuid;index"`
ServerID *uuid.UUID `json:"serverId" gorm:"type:uuid;index"`
Server *Server `json:"server,omitempty" gorm:"foreignKey:ServerID"`
UserID string `json:"userId" gorm:"not null"`
Username string `json:"username" gorm:"not null"`