Skip to content

Commit

Permalink
del obj with relations (#94)
Browse files Browse the repository at this point in the history
* add support for OPCODE_DELETE_WITH_RELATIONS

* github.com/aserto-dev/go-directory@del-obj-with-relations

* upd deps

* fix err msg
  • Loading branch information
gertd committed Jun 12, 2024
1 parent c03fabc commit f78a58e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/directory/v3/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (s *Importer) handleImportRequest(ctx context.Context, tx *bolt.Tx, req *ds
return err
}

return derr.ErrUnknownOpCode.Msgf("%s - %d", req.OpCode.Enum().String, int32(req.OpCode))
return derr.ErrUnknownOpCode.Msgf("%s - %d", req.OpCode.String(), int32(req.OpCode))

case *dsi3.ImportRequest_Relation:
if req.OpCode == dsi3.Opcode_OPCODE_SET {
Expand All @@ -113,10 +113,10 @@ func (s *Importer) handleImportRequest(ctx context.Context, tx *bolt.Tx, req *ds
}

if req.OpCode == dsi3.Opcode_OPCODE_DELETE_WITH_RELATIONS {
return derr.ErrInvalidOpCode.Msgf("%s for type relation", req.OpCode.Enum().String)
return derr.ErrInvalidOpCode.Msgf("%s for type relation", req.OpCode.String())
}

return derr.ErrUnknownOpCode.Msgf("%s - %d", req.OpCode.Enum().String, int32(req.OpCode))
return derr.ErrUnknownOpCode.Msgf("%s - %d", req.OpCode.String(), int32(req.OpCode))

default:
return derr.ErrUnknown.Msgf("import request")
Expand Down

0 comments on commit f78a58e

Please sign in to comment.