diff --git a/handlers.go b/handlers.go index 25bd566..2430a38 100644 --- a/handlers.go +++ b/handlers.go @@ -33,11 +33,17 @@ func boardHandler(w http.ResponseWriter, r *http.Request) { } args := r.URL.Query() // check args pre-conditions - if !checkArgExists(args, "board", w) { + if !(checkArgExists(args, "board", w) || checkArgExists(args, "name", w)) { errorResponse(400, "Missing required 'board' URL parameter", w, r) return } - board := args.Get("board") + board := "" + if checkArgExists(args, "name", w) { + board = args.Get("name") + } + if checkArgExists(args, "board", w) { + board = args.Get("board") + } if !checkArgExists(args, "count", w) || !checkArgInt(args, "count", w, 0) { //w.WriteHeader(400) errorResponse(400, "Missing required 'count' integer URL parameter", w, r)