public async Task <IActionResult> GetDepartments(int userId)
        {
            var creator = await _userRepo.GetUser(userId);

            if (creator.Id != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value))
            {
                return(Unauthorized());
            }

            IEnumerable <Department> departmentsFromRepo = await _repo.GetDepartments(userId);

            IEnumerable <DepartmentForCreationDto> departmentForReturn = _mapper.Map <IEnumerable <DepartmentForCreationDto> >(departmentsFromRepo);

            return(Ok(departmentForReturn));
        }