Skip to content

Commit

Permalink
mysql syntax fix
Browse files Browse the repository at this point in the history
  • Loading branch information
th0rn0 committed Sep 27, 2024
1 parent a569edf commit 539cd9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func getNextSongRandom() (Track, error) {

func getNextSongRandomExcludeURI(excludeUri spotify.URI) (Track, error) {
var track Track
if err := db.Raw("SELECT * FROM tracks AND uri != ? ORDER BY random()", excludeUri).First(&track).Error; err != nil {
if err := db.Raw("SELECT * FROM tracks WHERE uri != ? ORDER BY random()", excludeUri).First(&track).Error; err != nil {
return track, err
}
return track, nil
Expand Down

0 comments on commit 539cd9e

Please sign in to comment.