public ShortLinkDto GetShortLink(DeeplinkDto deeplinkDto) { ShortLinkEntity entity = _repository.GetByDeeplink(deeplinkDto.deeplink); if (entity == null) { string shortlink = ShortLinkHelper.GenerateShortLink(); WebUrlDto webUrlDto = _helper.ConvertDeeplinkToWebLink(deeplinkDto); entity = _repository.Insert(deeplinkDto.deeplink, webUrlDto.webUrl, shortlink); } return(new ShortLinkDto() { shortlink = entity.ShortLink }); }
public WebUrlDto GetWebUrl([FromBody] DeeplinkDto rDto) { return(_helper.ConvertDeeplinkToWebLink(rDto)); }