Skip to content
Snippets Groups Projects
Commit 31b58e6a authored by Alena Petraki's avatar Alena Petraki :nail_care_tone1:
Browse files

wip

parent 38b30c57
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ package middleware ...@@ -2,6 +2,7 @@ package middleware
import ( import (
"context" "context"
"fmt"
"git.perx.ru/perxis/perxis-go/pkg/collections" "git.perx.ru/perxis/perxis-go/pkg/collections"
"git.perx.ru/perxis/perxis-go/pkg/errors" "git.perx.ru/perxis/perxis-go/pkg/errors"
...@@ -79,6 +80,7 @@ func (m *encodeDecodeMiddleware) Create(ctx context.Context, item *items.Item, o ...@@ -79,6 +80,7 @@ func (m *encodeDecodeMiddleware) Create(ctx context.Context, item *items.Item, o
} }
func (m *encodeDecodeMiddleware) Update(ctx context.Context, upd *items.Item, options ...*items.UpdateOptions) (err error) { func (m *encodeDecodeMiddleware) Update(ctx context.Context, upd *items.Item, options ...*items.UpdateOptions) (err error) {
fmt.Println(22, upd.Data["run"])
var col *collections.Collection var col *collections.Collection
if upd != nil && (upd.Data != nil || upd.Translations != nil) { if upd != nil && (upd.Data != nil || upd.Translations != nil) {
col, err = m.colls.Get(ctx, upd.SpaceID, upd.EnvID, upd.CollectionID) col, err = m.colls.Get(ctx, upd.SpaceID, upd.EnvID, upd.CollectionID)
...@@ -89,6 +91,7 @@ func (m *encodeDecodeMiddleware) Update(ctx context.Context, upd *items.Item, op ...@@ -89,6 +91,7 @@ func (m *encodeDecodeMiddleware) Update(ctx context.Context, upd *items.Item, op
return err return err
} }
} }
fmt.Println(222, upd.Data["run"])
return m.next.Update(ctx, upd, options...) return m.next.Update(ctx, upd, options...)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment