Beispiel #1
0
        public IActionResult GoToMapping(string path)
        {
            var mapped = _urlService.Get(path);

            if (mapped != null)
            {
                return(new RedirectResult(mapped.ToString()));
            }
            return(NotFound());
        }
        public async Task <IActionResult> Get(string shortGuid)
        {
            try
            {
                var result = await urlService.Get(shortGuid);

                return(Ok(result));
            }
            catch (Exception e)
            {
                return(ExceptionResult(e));
            }
        }
        public async Task <IActionResult> Get(string shortGuid)
        {
            var result = await urlService.Get(shortGuid);

            return(Ok(result));
        }