Skip to content

Commit

Permalink
🐛 Fixed array search for existing breathing color hex codes
Browse files Browse the repository at this point in the history
  • Loading branch information
keelus committed Jul 29, 2023
1 parent e08e773 commit 4883612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/handlers/apiHandler/ledHandler/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func Add(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"details": "You can't add colors to fading rainbow."})
return
case "BreathingColor":
if sliceutil.Contains(config.LedPresets.BreathingColor, hex) {
if sliceutil.Contains(config.LedPresets.BreathingColor.Colors, hex) {
c.JSON(http.StatusBadRequest, gin.H{"details": "That color has been already added to this mode."})
return
}
Expand Down

0 comments on commit 4883612

Please sign in to comment.