diff --git a/internal/api/v1beta1/notification.go b/internal/api/v1beta1/notification.go index eef17289..4fa92a26 100644 --- a/internal/api/v1beta1/notification.go +++ b/internal/api/v1beta1/notification.go @@ -123,24 +123,24 @@ func (s *GRPCServer) PostNotification(ctx context.Context, req *sirenv1beta1.Pos }, nil } -func (s *GRPCServer) convertNotificationToPb(n notification.Notification) (*sirenv1beta1.Notification, error) { - pbData, err := structpb.NewStruct(n.Data) - if err != nil { - return nil, errors.ErrInternal.WithMsgf("failed to convert notification data to protobuf: %v", err) - } - - return &sirenv1beta1.Notification{ - Id: n.ID, - NamespaceId: n.NamespaceID, - Type: n.Type, - Data: pbData, - Labels: n.Labels, - ValidDuration: durationpb.New(n.ValidDuration), - Template: n.Template, - CreateAt: timestamppb.New(n.CreatedAt), - UniqueKey: n.UniqueKey, - }, nil -} +// func (s *GRPCServer) convertNotificationToPb(n notification.Notification) (*sirenv1beta1.Notification, error) { +// pbData, err := structpb.NewStruct(n.Data) +// if err != nil { +// return nil, errors.ErrInternal.WithMsgf("failed to convert notification data to protobuf: %v", err) +// } + +// return &sirenv1beta1.Notification{ +// Id: n.ID, +// NamespaceId: n.NamespaceID, +// Type: n.Type, +// Data: pbData, +// Labels: n.Labels, +// ValidDuration: durationpb.New(n.ValidDuration), +// Template: n.Template, +// CreateAt: timestamppb.New(n.CreatedAt), +// UniqueKey: n.UniqueKey, +// }, nil +// } func (s *GRPCServer) PostBulkNotifications(ctx context.Context, req *sirenv1beta1.PostBulkNotificationsRequest) (*sirenv1beta1.PostBulkNotificationsResponse, error) { if len(req.GetNotifications()) == 0 {