summaryrefslogtreecommitdiff
path: root/internal/router/api-v1-blog-search.go
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <145215889+SayaAndy@users.noreply.github.com> 2025-08-30 16:04:50 +0700
committerGravatar GitHub <noreply@github.com> 2025-08-30 16:04:50 +0700
commitd695dc09f44236be33fecc7a5ab9a326823170d9 (patch)
treec71c2c8f37a7609d6c8a7b558b71a1a1b4c9ec1c /internal/router/api-v1-blog-search.go
parenta3d04476daa507cf941a5b82355c744c6622246c (diff)
parent1c14a4088b068fefe425cad1acdde2d603bd27a9 (diff)
downloadweb-0.7.0.tar.gz
web-0.7.0.zip
v0.7.0 (#6)v0.7.0
feat: like button with persistent storage and like count feat: show like count on blog search feat: update galleries on resize (with smooth animations) feat: add decor for night & ram themes feat: show search buttons in catalogue separately without overflow feat: add overflow to search tags in catalogue in mobile mode feat: update go (1.24.5 > 1.24.6) feat: add favicon refactor: shorten logs of blog search
Diffstat (limited to 'internal/router/api-v1-blog-search.go')
-rw-r--r--internal/router/api-v1-blog-search.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/router/api-v1-blog-search.go b/internal/router/api-v1-blog-search.go
index 51ace85..e22fabe 100644
--- a/internal/router/api-v1-blog-search.go
+++ b/internal/router/api-v1-blog-search.go
@@ -48,7 +48,7 @@ func Api_V1_BlogSearch(l map[string]*locale.LocaleConfig, langs []string, b2Clie
c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)
return c.Status(fiber.ErrInternalServerError.Code).SendString("failed to generate regex for tags gathering")
}
- decodedQuery, err := url.QueryUnescape(string(encodedQuery))
+ decodedQuery, _ := url.QueryUnescape(string(encodedQuery))
matches := re.FindAllStringSubmatch(decodedQuery, -1)
tags := make([]string, 0, len(matches))
@@ -69,6 +69,7 @@ func Api_V1_BlogSearch(l map[string]*locale.LocaleConfig, langs []string, b2Clie
"ShortDescription": page.Metadata.ShortDescription,
"Thumbnail": page.Metadata.Thumbnail,
"Tags": page.Metadata.Tags,
+ "LikeCount": CCache.GetLikeCount(page.FileName),
})
break
}