public async Task <IActionResult> Post([FromBody] FilmViewModel theFilm)
 {
     try
     {
         if (ModelState.IsValid)
         {
             var newFilm = Mapper.Map <Film>(theFilm);
             var result  = _parserService.ParseLink(newFilm.Link);
             if (result.Success)
             {
                 if (string.IsNullOrWhiteSpace(User.Identity.Name))
                 {
                     newFilm.UserName = User.FindFirst(ClaimTypes.NameIdentifier).Value;
                 }
                 else
                 {
                     newFilm.UserName = User.Identity.Name;
                 }
                 newFilm.Title         = result.Title;
                 newFilm.OriginalTitle = result.OriginalTitle;
                 newFilm.Cover         = result.Cover;
                 newFilm.Director      = result.Director;
                 newFilm.Screenplay    = result.Screenplay;
                 newFilm.Genre         = result.Genre;
                 newFilm.Country       = result.Country;
                 newFilm.ReleaseDate   = result.ReleaseDate;
                 newFilm.Cast          = result.Cast;
                 newFilm.Description   = result.Description;
                 string postResult = _repository.AddFilm(newFilm);
                 if (postResult == string.Empty)
                 {
                     if (await _repository.SaveChangesAsync())
                     {
                         string encodedUrl = WebUtility.UrlEncode($"api/films/{newFilm.Title}");
                         return(Created(encodedUrl, Mapper.Map <FilmViewModel>(newFilm)));
                     }
                 }
                 else
                 {
                     ModelState.AddModelError("", postResult);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
     return(BadRequest(ModelState));
 }