Exemple #1
0
        public async Task <IActionResult> GetScans(string upc)
        {
            List <Scan> upcMatches;

            if (string.IsNullOrEmpty(upc))
            {
                return(BadRequest());
            }   // if

            try
            {
                upcMatches = await _ScanService.GetScans(upc);
            }   //try
            catch (Exception e)
            {
                return(StatusCode(500));
            }   // catch

            return(Json(upcMatches));
        }       // GetScans(string)