mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-10 14:16:47 -04:00
Refactor alliance storage to use a single object per alliance instead of one per alliance-team association.
This commit is contained in:
@@ -23,7 +23,7 @@ var BaseDir = "." // Mutable for testing
|
||||
type Database struct {
|
||||
Path string
|
||||
bolt *bbolt.DB
|
||||
allianceTeamTable *table[AllianceTeam]
|
||||
allianceTable *table[Alliance]
|
||||
awardTable *table[Award]
|
||||
eventSettingsTable *table[EventSettings]
|
||||
lowerThirdTable *table[LowerThird]
|
||||
@@ -46,7 +46,7 @@ func OpenDatabase(filename string) (*Database, error) {
|
||||
}
|
||||
|
||||
// Register tables.
|
||||
if database.allianceTeamTable, err = newTable[AllianceTeam](&database); err != nil {
|
||||
if database.allianceTable, err = newTable[Alliance](&database); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if database.awardTable, err = newTable[Award](&database); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user