Skip to content

Commit

Permalink
Changed /users/blocks to return [] instead of nil
Browse files Browse the repository at this point in the history
  • Loading branch information
Xemdo committed Nov 28, 2023
1 parent fe21ba4 commit 68017bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/mock_api/endpoints/users/blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func getBlocks(w http.ResponseWriter, r *http.Request) {
}

if len(dbr.Data.([]database.Block)) == 0 {
dbr.Data = make([]database.Block, 0)
apiResponse.Data = make([]database.Block, 0)
}

if len(dbr.Data.([]database.Block)) == dbr.Limit {
Expand Down

0 comments on commit 68017bf

Please sign in to comment.