Refactor of serialization function applied to getItem.go

This commit is contained in:
Danny Adams 2023-01-06 09:54:42 -05:00
parent d331ad8ecf
commit 105314d379

View File

@ -115,21 +115,22 @@ func runDisplayM365JSON(
channel := make(chan data.Stream, 1)
sw := kw.NewJsonSerializationWriter()
response, err := get(ctx, user, m365ID)
if err != nil {
return errors.Wrap(err, support.ConnectorStackErrorTrace(err))
}
// First return is the number of bytes that were serialized. Ignored
_, err = serializeFunc(ctx, gs.Client(), sw, channel, response, user)
service := gs.(graph.Service)
_, err = serializeFunc(ctx, &service, channel, response, user)
close(channel)
if err != nil {
return err
}
sw := kw.NewJsonSerializationWriter()
for item := range channel {
buf := &bytes.Buffer{}