Fixing build issues
This commit is contained in:
parent
dae87e41e7
commit
4cbe281e4f
16
web.go
16
web.go
|
@ -72,6 +72,7 @@ func (web *WebServer) add(w http.ResponseWriter, r *http.Request) {
|
||||||
fmt.Fprintf(w, "Invalid Token")
|
fmt.Fprintf(w, "Invalid Token")
|
||||||
} else {
|
} else {
|
||||||
add(uname, html.UnescapeString(r.FormValue("value")))
|
add(uname, html.UnescapeString(r.FormValue("value")))
|
||||||
|
fmt.Fprintf(w, "Success")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,8 +81,9 @@ func (web *WebServer) volume(w http.ResponseWriter, r *http.Request) {
|
||||||
if uname == nil {
|
if uname == nil {
|
||||||
fmt.Fprintf(w, "Invalid Token")
|
fmt.Fprintf(w, "Invalid Token")
|
||||||
} else {
|
} else {
|
||||||
var volume = html.UnescapeString(r.FormValue("value"))
|
var vol = html.UnescapeString(r.FormValue("value"))
|
||||||
volume(uname, volume)
|
volume(uname, vol)
|
||||||
|
fmt.Fprintf(w, "Success")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,8 +92,14 @@ func (web *WebServer) skip(w http.ResponseWriter, r *http.Request) {
|
||||||
if uname == nil {
|
if uname == nil {
|
||||||
fmt.Fprintf(w, "Invalid Token")
|
fmt.Fprintf(w, "Invalid Token")
|
||||||
} else {
|
} else {
|
||||||
var playlist = html.UnescapeString(r.FormValue("value"))
|
value = html.UnescapeString(r.FormValue("value"))
|
||||||
skip(uname, false, playlist)
|
playlist, err := strconv.ParseBool(playlist)
|
||||||
|
if err == nil {
|
||||||
|
skip(uname, false, playlist)
|
||||||
|
fmt.Fprintf(w, "Success")
|
||||||
|
} else {
|
||||||
|
fmt.Fprintf(w, "Invalid Value")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue