Ejemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <TranslationWithFile> > > FindTranslationByMemory(Guid currentProjectId, string translationText, Guid locId)
        {
            if (translationText == null || translationText == "")
            {
                return(NotFound($"Запрашиваемый вариант перевода пуст"));
            }

            var  identityName = User.Identity.Name;
            Guid userId       = (Guid)userRepository.GetID(identityName);

            var translations = await translationRepository.GetAllTranslationsByMemory(translationText, userId, locId);

            return(Ok(translations));
        }