switched to different header set method
This commit is contained in:
4
api.go
4
api.go
@@ -103,14 +103,14 @@ func GetPackages(w http.ResponseWriter, r *http.Request) {
|
|||||||
offset, err := strconv.Atoi(r.URL.Query().Get("offset"))
|
offset, err := strconv.Atoi(r.URL.Query().Get("offset"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debugf("error parsing page: %v", err)
|
log.Debugf("error parsing page: %v", err)
|
||||||
render.Status(r, http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
limit, err := strconv.Atoi(r.URL.Query().Get("limit"))
|
limit, err := strconv.Atoi(r.URL.Query().Get("limit"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debugf("error parsing page: %v", err)
|
log.Debugf("error parsing page: %v", err)
|
||||||
render.Status(r, http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user