Exemple #1
0
        public void should_Enroll_Device_New()
        {
            var device = new DeviceInfo(Guid.NewGuid().ToString(), "LG G6", _practice.Id);

            var code = _activationService.EnrollDevice(device);

            Assert.IsTrue(!string.IsNullOrWhiteSpace(code));
            Console.WriteLine($"{device}>>>{code}");
        }
 public IActionResult EnrollSiteDevice([FromBody] DeviceInfo deviceInfo)
 {
     try
     {
         var idprefix = _activationService.EnrollDevice(deviceInfo);
         return(Ok(idprefix));
     }
     catch (Exception e)
     {
         Log.Debug($"Error activating Device: {e}");
         return(StatusCode(500, "Error activating Device"));
     }
 }