Skip to content

Commit

Permalink
fix(history): return 404 when history finishes
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed May 27, 2024
1 parent 7145f51 commit 4be6ae0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions handlers/apis/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func (h *historyApi) HandleGetMoreHistoryItems(w http.ResponseWriter, r *http.Re
if err != nil {
log.Errorln(err)
}
if len(recentPlays) == 0 {
w.WriteHeader(http.StatusNotFound)
return
}

outBuf := bytes.NewBuffer([]byte{})
for _, s := range recentPlays {
Expand Down

0 comments on commit 4be6ae0

Please sign in to comment.