Esempio n. 1
0
        public async Task <IActionResult> GetSearch(string query)
        {
            try
            {
                var result = await _searchServices.GetSearch(query);

                if (result.Item1 != null || result.Item2 != null)
                {
                    return(Ok(result));
                }
                else
                {
                    return(NotFound());
                }
            }
            catch (Exception)
            {
                throw new Exception("An error has occured while fetching the data");
            }
        }