Example #1
0
 public async Task <IActionResult> Get([FromQuery] DeviceDto param)
 {
     if (await _fCMService.CheckDevice(param.EmpId, param.DeviceId))
     {
         return(StatusCode(201));
     }
     return(BadRequest());
 }
Example #2
0
        public async Task <IActionResult> CheckDevice([FromBody] DeviceDataset device)
        {
            string user   = User.FindFirstValue(ClaimTypes.NameIdentifier);
            int?   userId = null;

            if (user != null)
            {
                userId = int.Parse(user);
            }
            if (await _fcmService.CheckDevice(userId, device.DeviceId))
            {
                return(StatusCode(201));
            }
            return(BadRequest());
        }