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" }); }
public PushNotificationRes PushNotification([FromBodyAttribute] PushNotificationReq request) { return(new PushNotificationService(_db).PushNotification(request)); }