Skip to content

Commit 97c7989

Browse files
committed
Update leaderboards after full recalc
1 parent b298048 commit 97c7989

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmd/console/commands/clan_recalc.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package commands
22

33
import (
44
"github.com/Quaver/api2/db"
5+
"github.com/Quaver/api2/enums"
56
"github.com/sirupsen/logrus"
67
"github.com/spf13/cobra"
78
)
@@ -23,5 +24,14 @@ var ClanRecalculateCommand = &cobra.Command{
2324
return
2425
}
2526
}
27+
28+
for _, clan := range clans {
29+
for i := 1; i <= 2; i++ {
30+
if err := db.UpdateClanLeaderboard(clan, enums.GameMode(i)); err != nil {
31+
logrus.Error(err)
32+
return
33+
}
34+
}
35+
}
2636
},
2737
}

0 commit comments

Comments
 (0)