feat(showcase): 去掉 Bento 灵感类型,只保留 hero / work

后端校验、分组、后台列表,以及后台页面与首页取图都只认
hero 和 work;启动时清掉遗留的 bento 记录。

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
2026-10-27 15:57:12 +08:00
co-authored by Devin
parent 2fa0324a66
commit 8b85d5623a
6 changed files with 20 additions and 36 deletions
+3 -3
View File
@@ -46,16 +46,16 @@ func (h *ShowcaseHandler) List(c *gin.Context) {
// AdminList is the paginated flat view for the admin 首页内容 page — the public
// List keeps its grouped shape for the home page, this one adds kind filter +
// limit/offset/total. Order mirrors the old client flattening: hero → bento → work.
// limit/offset/total. Order mirrors the old client flattening: hero → work.
func (h *ShowcaseHandler) AdminList(c *gin.Context) {
grouped, err := h.showcase.Grouped(c.Request.Context())
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"detail": "failed to load showcase"})
return
}
kindFilter := c.Query("kind") // "" | hero | bento | work
kindFilter := c.Query("kind") // "" | hero | work
flat := make([]gin.H, 0, 16)
for _, kind := range []string{"hero", "bento", "work"} {
for _, kind := range []string{"hero", "work"} {
if kindFilter != "" && kind != kindFilter {
continue
}