public void Update([FromRoute] string name, [FromBody] DownTimeAlerterViewModel model)
 {
     if (string.IsNullOrEmpty(name) || !ModelState.IsValid)
     {
         return;
     }
     _workerService.Update(name, new WorkerDto()
     {
         Name             = model.Name,
         Url              = model.Url,
         Email            = model.Email,
         NotificationType = model.NotificationType,
         Timer            = new Timer(model.Interval)
     });
 }
        public void Create([FromBody] DownTimeAlerterViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return;
            }

            var worker = new WorkerDto()
            {
                Name             = model.Name,
                Url              = model.Url,
                Email            = model.Email,
                NotificationType = model.NotificationType,
                Timer            = new Timer(model.Interval)
            };

            _workerService.Add(model.Name, worker);
        }