BMC: Add from body attribute into GetNotification method
This commit is contained in:
		
							parent
							
								
									02243079b2
								
							
						
					
					
						commit
						2750b3d25e
					
				@ -13,7 +13,7 @@ namespace BCS.BMC.FirebaseCloudMessaging.Dto
 | 
				
			|||||||
        //public string DeviceId { get; set; }
 | 
					        //public string DeviceId { get; set; }
 | 
				
			||||||
        //[JsonProperty("isAndroidDevice")]
 | 
					        //[JsonProperty("isAndroidDevice")]
 | 
				
			||||||
        //public bool IsAndroidDevice { get; set; }
 | 
					        //public bool IsAndroidDevice { get; set; }
 | 
				
			||||||
        //[JsonProperty("title")]
 | 
					        [JsonProperty("title")]
 | 
				
			||||||
        public string Title { get; set; }
 | 
					        public string Title { get; set; }
 | 
				
			||||||
        [JsonProperty("body")]
 | 
					        [JsonProperty("body")]
 | 
				
			||||||
        public string Body { get; set; }
 | 
					        public string Body { get; set; }
 | 
				
			||||||
 | 
				
			|||||||
@ -12,9 +12,8 @@ namespace BCS.BMC.FirebaseCloudMessaging
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    public class FirebaseNotificationAppService : IFirebaseNotificationAppService
 | 
					    public class FirebaseNotificationAppService : IFirebaseNotificationAppService
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        private readonly ILogger _logger;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public FirebaseNotificationAppService(ILogger logger)
 | 
					        public FirebaseNotificationAppService()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (FirebaseApp.DefaultInstance is null)
 | 
					            if (FirebaseApp.DefaultInstance is null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
@ -23,7 +22,6 @@ namespace BCS.BMC.FirebaseCloudMessaging
 | 
				
			|||||||
                    Credential = GoogleCredential.FromFile("firechat-57601-firebase-adminsdk-anscp-e04366c4d4.json")
 | 
					                    Credential = GoogleCredential.FromFile("firechat-57601-firebase-adminsdk-anscp-e04366c4d4.json")
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            _logger = logger;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -47,7 +45,7 @@ namespace BCS.BMC.FirebaseCloudMessaging
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        public async Task GetNotification(NotificationModel notification)
 | 
					        public async Task GetNotification(NotificationModel notification)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            _logger.LogInformation("Bwac Notifications" + notification);
 | 
					            var data = notification;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -31,9 +31,9 @@ namespace BCS.BMC.Web.Controllers
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        [HttpPost]
 | 
					        [HttpPost]
 | 
				
			||||||
        public async Task<IActionResult> GetNotifications(NotificationModel notification)
 | 
					        public async Task<IActionResult> GetNotifications([FromBody] NotificationModel notification)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            var result =  _notificationService.GetNotification(notification);
 | 
					           // var result =  _notificationService.GetNotification(notification);
 | 
				
			||||||
            return Ok();
 | 
					            return Ok();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user