Skip to content

Commit

Permalink
Return arrays instead of null on rule creation (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas authored Oct 21, 2017
1 parent 76e58f2 commit 02e88be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rule/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ func (h *Handler) Delete(w http.ResponseWriter, r *http.Request, ps httprouter.P
}

func decodeRule(w http.ResponseWriter, r *http.Request) (*Rule, error) {
var rule jsonRule
rule := jsonRule{
MatchesMethods: []string{},
RequiredScopes: []string{},
}
if err := json.NewDecoder(r.Body).Decode(&rule); err != nil {
return nil, err
}
Expand Down

0 comments on commit 02e88be

Please sign in to comment.