fix: idx to index

This commit is contained in:
xuu
2022-08-11 01:18:42 +00:00
parent 5e87ccda79
commit 50b44a7bb7
5 changed files with 31 additions and 7 deletions

View File

@@ -67,7 +67,7 @@ func (s *service) get(w http.ResponseWriter, r *http.Request) {
var pos, count int64 = -1, -99
qry := r.URL.Query()
if i, err := strconv.ParseInt(qry.Get("idx"), 10, 64); err == nil {
if i, err := strconv.ParseInt(qry.Get("index"), 10, 64); err == nil {
pos = i
}
if i, err := strconv.ParseInt(qry.Get("n"), 10, 64); err == nil {
@@ -177,7 +177,7 @@ func (s *service) websocket(w http.ResponseWriter, r *http.Request) {
var pos int64 = -1
qry := r.URL.Query()
if i, err := strconv.ParseInt(qry.Get("idx"), 10, 64); err == nil {
if i, err := strconv.ParseInt(qry.Get("index"), 10, 64); err == nil {
pos = i
}