diff --git a/noolite-cli.go b/noolite-cli.go index ebe2646..65a65ab 100644 --- a/noolite-cli.go +++ b/noolite-cli.go @@ -3,6 +3,7 @@ package main import ( "flag" "fmt" + "strconv" "github.com/dedkovd/noolite" "net/http" ) @@ -75,7 +76,8 @@ func main() { if !ok { fmt.Fprintf(w, "Channel param required\n") } else { - err := n.Switch(c) + cn, _ := strconv.Atoi(c[0]) + err = n.Switch(cn) } if err != nil {