From 3442a92f359b35a76244dfc4f2e55a34d4ec1b2b Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sun, 6 Oct 2024 17:47:06 +0300 Subject: Фикс ссылок + обработка ошибок MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/tpl/quote_templ.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/tpl/quote_templ.go') diff --git a/pkg/tpl/quote_templ.go b/pkg/tpl/quote_templ.go index e374b88..3aa96a1 100644 --- a/pkg/tpl/quote_templ.go +++ b/pkg/tpl/quote_templ.go @@ -69,7 +69,7 @@ func Quote(quote *model.Quote) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var4 templ.SafeURL = templ.URL(fmt.Sprintf("https://t.me/share/url?url=https://sh.org.ru/%d&text=%s", quote.ID, quote.Quote)) + var templ_7745c5c3_Var4 templ.SafeURL = templ.URL(fmt.Sprintf("https://t.me/share/url?url=https://sh.org.ru/quote/%d", quote.ID)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var4))) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -78,7 +78,7 @@ func Quote(quote *model.Quote) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var5 templ.SafeURL = templ.URL(fmt.Sprintf("https://vk.com/share.php?url=https://sh.org.ru/%d", quote.ID)) + var templ_7745c5c3_Var5 templ.SafeURL = templ.URL(fmt.Sprintf("https://vk.com/share.php?url=https://sh.org.ru/quote/%d", quote.ID)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var5))) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -87,7 +87,7 @@ func Quote(quote *model.Quote) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var6 templ.SafeURL = templ.URL(fmt.Sprintf("https://connect.ok.ru/offer?url=https://sh.org.ru/%d", quote.ID)) + var templ_7745c5c3_Var6 templ.SafeURL = templ.URL(fmt.Sprintf("https://connect.ok.ru/offer?url=https://sh.org.ru/quote/%d", quote.ID)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var6))) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err -- cgit v1.2.3