Skip to content

Commit

Permalink
Merge pull request #47 from imulab/development
Browse files Browse the repository at this point in the history
Merge pull request changes into master
  • Loading branch information
imulab authored Feb 22, 2020
2 parents b5e5451 + 81b2cf3 commit 51e18ff
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/v2/service/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ import (
"context"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"strings"

"github.com/imulab/go-scim/pkg/v2/crud"
"github.com/imulab/go-scim/pkg/v2/crud/expr"
"github.com/imulab/go-scim/pkg/v2/db"
scimjson "github.com/imulab/go-scim/pkg/v2/json"
"github.com/imulab/go-scim/pkg/v2/prop"
"github.com/imulab/go-scim/pkg/v2/service/filter"
"github.com/imulab/go-scim/pkg/v2/spec"
"io"
"io/ioutil"
)

// PatchService returns a patch resource service. preFilters will run after resource fetched from database and before
Expand Down Expand Up @@ -105,7 +107,7 @@ func (s *patchService) Do(ctx context.Context, req *PatchRequest) (resp *PatchRe
}

for _, patchOp := range patch.Operations {
switch patchOp.Op {
switch strings.ToLower(patchOp.Op) {
case "add":
if valueToAdd, err := patchOp.ParseValue(resource); err != nil {
return nil, err
Expand Down

0 comments on commit 51e18ff

Please sign in to comment.