Skip to content
This repository has been archived by the owner on Feb 28, 2019. It is now read-only.

Commit

Permalink
Further address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
m-sandusky committed Jan 8, 2018
1 parent 658b6a7 commit 3965184
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion service/r2/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func validateRuleSet(s *service, r *http.Request) (data interface{}, err error)
if err := s.store.ValidateRuleSet(rss); err != nil {
return nil, err
}
return fmt.Sprintf("Ruleset is valid"), nil
return "Ruleset is valid", nil
}

func deleteNamespace(s *service, r *http.Request) (data interface{}, err error) {
Expand Down
4 changes: 3 additions & 1 deletion service/r2/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (s *service) validateNamespace(w http.ResponseWriter, r *http.Request) erro
if err != nil {
return err
}
return s.sendResponse(w, http.StatusOK, data)
return writeAPIResponse(w, http.StatusOK, data.(string))
}

func (s *service) deleteNamespace(w http.ResponseWriter, r *http.Request) error {
Expand Down Expand Up @@ -569,6 +569,8 @@ type ruleSetJSON struct {
// Creates a new RuleSetSnapshot from a rulesetJSON. If the ruleSetJSON has no IDs for any of its
// mapping rules or rollup rules, it generates missing IDs and sets as a string UUID string so they
// can be stored in a mapping (id -> rule).
// This is used in the case where a new rollupRule or mappingRule has been created from the client
// side and thusly does not have a ID set for it.
func (r ruleSetJSON) ruleSetSnapshot(opts ruleSetSnapshotOpts) *rules.RuleSetSnapshot {
rss := rules.RuleSetSnapshot{
Namespace: r.Namespace,
Expand Down

0 comments on commit 3965184

Please sign in to comment.