service backend
This commit is contained in:
43
api/pkg/messaging/notifications/invitation/invitation.go
Normal file
43
api/pkg/messaging/notifications/invitation/invitation.go
Normal file
@@ -0,0 +1,43 @@
|
||||
package notifications
|
||||
|
||||
import (
|
||||
messaging "github.com/tech/sendico/pkg/messaging/envelope"
|
||||
on "github.com/tech/sendico/pkg/messaging/notifications/object"
|
||||
nm "github.com/tech/sendico/pkg/model/notification"
|
||||
"github.com/tech/sendico/pkg/mservice"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
func InvitationCreated(
|
||||
sender string,
|
||||
actorAccountRef primitive.ObjectID,
|
||||
objectType mservice.Type,
|
||||
objectRef primitive.ObjectID,
|
||||
) messaging.Envelope {
|
||||
return on.ObjectCreated(sender, actorAccountRef, mservice.Invitations, objectRef)
|
||||
}
|
||||
|
||||
func InvitationUpdated(
|
||||
sender string,
|
||||
actorAccountRef primitive.ObjectID,
|
||||
objectRef primitive.ObjectID,
|
||||
) messaging.Envelope {
|
||||
return on.ObjectUpdated(sender, actorAccountRef, mservice.Invitations, objectRef)
|
||||
}
|
||||
|
||||
func InvitationDeleted(
|
||||
sender string,
|
||||
actorAccountRef primitive.ObjectID,
|
||||
objectRef primitive.ObjectID,
|
||||
) messaging.Envelope {
|
||||
return on.ObjectDeleted(sender, actorAccountRef, mservice.Invitations, objectRef)
|
||||
}
|
||||
|
||||
func Invitation(
|
||||
sender string,
|
||||
actorAccountRef primitive.ObjectID,
|
||||
objectRef primitive.ObjectID,
|
||||
action nm.NotificationAction,
|
||||
) messaging.Envelope {
|
||||
return on.Object(sender, actorAccountRef, mservice.Invitations, objectRef, action)
|
||||
}
|
||||
Reference in New Issue
Block a user