mirror of
https://github.com/1f349/lavender.git
synced 2024-09-08 03:06:37 +01:00
Remove invalid offset error
This commit is contained in:
parent
60e6d7e80b
commit
0d49ed512a
@ -12,16 +12,8 @@ import (
|
||||
)
|
||||
|
||||
func (h *HttpServer) ManageAppsGet(rw http.ResponseWriter, req *http.Request, _ httprouter.Params, auth UserAuth) {
|
||||
offset := 0
|
||||
q := req.URL.Query()
|
||||
if q.Has("offset") {
|
||||
var err error
|
||||
offset, err = strconv.Atoi(q.Get("offset"))
|
||||
if err != nil {
|
||||
http.Error(rw, "400 Bad Request: Invalid offset", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
}
|
||||
offset, _ := strconv.Atoi(q.Get("offset"))
|
||||
|
||||
var roles string
|
||||
var appList []database.GetAppListRow
|
||||
|
@ -10,16 +10,8 @@ import (
|
||||
)
|
||||
|
||||
func (h *HttpServer) ManageUsersGet(rw http.ResponseWriter, req *http.Request, _ httprouter.Params, auth UserAuth) {
|
||||
offset := 0
|
||||
q := req.URL.Query()
|
||||
if q.Has("offset") {
|
||||
var err error
|
||||
offset, err = strconv.Atoi(q.Get("offset"))
|
||||
if err != nil {
|
||||
http.Error(rw, "400 Bad Request: Invalid offset", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
}
|
||||
offset, _ := strconv.Atoi(q.Get("offset"))
|
||||
|
||||
var roles string
|
||||
var userList []database.GetUserListRow
|
||||
|
Loading…
Reference in New Issue
Block a user