Example #1
0
        public IActionResult PostSickLeave([FromBody] SickLeaveForCreationDTO sickLeaveFromRequest)
        {
            if (sickLeaveFromRequest == null)
            {
                return(BadRequest());
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            _repo.AddSickLeave(ModelsMapping.GetSickLeaveEntity(sickLeaveFromRequest));
            return(Ok());
        }