Optimize all modals (fetching). Implement add-player modal.

This commit is contained in:
MaxJa4
2024-01-16 20:19:40 +01:00
parent 8c4ed63359
commit fc084108ac
13 changed files with 134 additions and 91 deletions

View File

@@ -33,7 +33,7 @@ func GetAllPlayers(c *gin.Context) {
// GetPlayersByClanHTML GET /players_html
func GetPlayersByClanHTML(c *gin.Context) {
var players []models.Player
clanId := c.Request.URL.Query().Get("id")
clanId := c.Request.URL.Query().Get("clan_id")
if err := models.DB.Where("clan_id = ?", utils.StringToUint(clanId)).Find(&players).Error; err != nil {
return
}