From 0ebbd4fb784faad7c01e7cebe18f3df8a823f4c8 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Fri, 29 Sep 2023 13:09:55 +0600 Subject: [PATCH] :art: Embed Action domain in entry HTTP delivery --- internal/entry/delivery/http/entry_http.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/entry/delivery/http/entry_http.go b/internal/entry/delivery/http/entry_http.go index 1411b86..1a9ebed 100644 --- a/internal/entry/delivery/http/entry_http.go +++ b/internal/entry/delivery/http/entry_http.go @@ -127,7 +127,7 @@ type ( } Action struct { - Value domain.Action `json:"-"` + domain.Action `json:"-"` } bufferHTML struct { @@ -961,15 +961,15 @@ func (a *Action) UnmarshalJSON(b []byte) error { return err } - a.Value = out + a.Action = out return nil } func (a Action) MarshalJSON() ([]byte, error) { - if a.Value == domain.ActionUnd { + if a.Action == domain.ActionUnd { return []byte(`""`), nil } - return []byte(strconv.Quote(a.Value.String())), nil + return []byte(strconv.Quote(a.Action.String())), nil }