示例#1
0
        public PushNotificationRes PushNotification(PushNotificationReq request)
        {
            string deviceId = getDeviceId(request.UserId);

            if (deviceId == null)
            {
                return(new PushNotificationRes()
                {
                    status = 0,
                    developerMessage = "Invalid UserId"
                });
            }


            Utils.NotificationUtils.SendNotification(request.Message, deviceId);

            return(new PushNotificationRes()
            {
                status = 1,
                developerMessage = "Notification Sent"
            });
        }
示例#2
0
 public PushNotificationRes PushNotification([FromBodyAttribute] PushNotificationReq request)
 {
     return(new PushNotificationService(_db).PushNotification(request));
 }