chore: fix
This commit is contained in:
@@ -19,12 +19,21 @@ func GetPublicSettings(c *gin.Context) {
|
||||
settings = db.DefaultSettings()
|
||||
}
|
||||
|
||||
poolNames := make([]string, len(settings.PointsPools))
|
||||
poolKeys := make([]string, len(settings.PointsPools))
|
||||
for i, p := range settings.PointsPools {
|
||||
poolNames[i] = p.Name
|
||||
poolKeys[i] = p.Key
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": true,
|
||||
"penalties_enabled": settings.PenaltiesEnabled,
|
||||
"show_amende_score": settings.ShowAmendeScore,
|
||||
"points_enabled": settings.PointsEnabled,
|
||||
"points_separated": len(settings.PointsPools) > 1,
|
||||
"pool_names": poolNames,
|
||||
"pool_keys": poolKeys,
|
||||
"referral_enabled": settings.ReferralEnabled,
|
||||
"delivery_schedule": settings.DeliverySchedule,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user