[#391] Refactor notifications

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-04-29 16:08:22 +03:00 committed by Alex Vanin
parent ea8e1b3b19
commit 94caa2247e
11 changed files with 279 additions and 278 deletions

View file

@ -134,13 +134,13 @@ func (h *handler) CopyObjectHandler(w http.ResponseWriter, r *http.Request) {
zap.String("object", info.Name),
zap.Stringer("object_id", info.ID))
s := &layer.SendNotificationParams{
Event: layer.EventObjectCreatedCopy,
s := &SendNotificationParams{
Event: EventObjectCreatedCopy,
ObjInfo: info,
BktInfo: dstBktInfo,
ReqInfo: reqInfo,
}
if err := h.obj.SendNotifications(r.Context(), s); err != nil {
if err = h.sendNotifications(r.Context(), s); err != nil {
h.log.Error("couldn't send notification: %w", zap.Error(err))
}
}