public IActionResult RedirectFromHash(string hash) { string finalUrl = repository.GetLinkFromHash(hash); return(Redirect(finalUrl)); }
public IActionResult GetLink(string hash) { string link = repository.GetLinkFromHash(hash); return(Ok(new { link })); }