From 8c5b698acb31fadceec2ad4175addefd06daa473 Mon Sep 17 00:00:00 2001 From: Florian Hoss Date: Mon, 30 Sep 2024 22:03:58 +0200 Subject: [PATCH] Fix urls --- services/bookmark.services.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/bookmark.services.go b/services/bookmark.services.go index 5da05cf..3ba8014 100644 --- a/services/bookmark.services.go +++ b/services/bookmark.services.go @@ -140,11 +140,10 @@ func downloadIcon(title, url string) ([]byte, error) { } func handleSelfHostedIcons(icon, ext string) (string, string, string, string) { - ext = strings.TrimPrefix(ext, ".") title := strings.Replace(icon, "shi/", "", 1) - url := "https://cdn.jsdelivr.net/gh/selfhst/icons/" + ext + "/" + title + url := "https://cdn.jsdelivr.net/gh/selfhst/icons/" + strings.TrimPrefix(ext, ".") + "/" + title lightTitle := strings.Replace(title, ext, "-light.svg", 1) - lightUrl := "https://cdn.jsdelivr.net/gh/selfhst/icons/" + ext + "/" + lightTitle + lightUrl := "https://cdn.jsdelivr.net/gh/selfhst/icons/" + strings.TrimPrefix(ext, ".") + "/" + lightTitle return title, url, lightTitle, lightUrl }