move api/server to api/edge/bff
This commit is contained in:
19
api/edge/bff/internal/server/invitationimp/notifications.go
Normal file
19
api/edge/bff/internal/server/invitationimp/notifications.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package invitationimp
|
||||
|
||||
import (
|
||||
messaging "github.com/tech/sendico/pkg/messaging/envelope"
|
||||
in "github.com/tech/sendico/pkg/messaging/notifications/invitation"
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
nm "github.com/tech/sendico/pkg/model/notification"
|
||||
"github.com/tech/sendico/pkg/mutil/mzap"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
)
|
||||
|
||||
func (a *InvitationAPI) notification(
|
||||
invitation *model.Invitation,
|
||||
actorAccountRef bson.ObjectID,
|
||||
t nm.NotificationAction,
|
||||
) messaging.Envelope {
|
||||
a.Logger.Debug("Sending notification of new invitation created", mzap.StorableRef(invitation))
|
||||
return in.Invitation(a.Name(), actorAccountRef, invitation.ID, t)
|
||||
}
|
||||
Reference in New Issue
Block a user