forked from ebhomengo/niki
1
0
Fork 0
niki/service/notification/kindbox_assigned.go

22 lines
665 B
Go
Raw Permalink Normal View History

package notification
import (
"context"
"fmt"
params "git.gocasts.ir/ebhomengo/niki/param"
adminserviceparam "git.gocasts.ir/ebhomengo/niki/param/admin/admin"
smsmsg "git.gocasts.ir/ebhomengo/niki/pkg/sms_msg"
)
func (s Service) KindBoxAssigned(req params.NotificationKindBoxAssigned) {
const op = "notification.KindBoxAssigned"
ctx := context.Background()
bnf, gErr := s.AdminSvc.AdminExistByID(ctx, adminserviceparam.AdminExistByIDRequest{AdminID: req.ReceiverAgentID})
if gErr != nil {
fmt.Println(fmt.Errorf("error(%s):%w", op, gErr))
}
s.smsAdapter.Send(bnf.Admin.PhoneNumber, fmt.Sprintf(smsmsg.SmsMsgKindBoxAssigned, bnf.Admin.FirstName))
}