From f328de00fd0b447f901e8f3260350e2c64c6f1ba Mon Sep 17 00:00:00 2001 From: yanghao05 Date: Wed, 9 Apr 2025 18:49:20 +0800 Subject: [PATCH] fix: frontend query --- backend/app/http/posts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/http/posts.go b/backend/app/http/posts.go index 60ac8d3..52ca823 100644 --- a/backend/app/http/posts.go +++ b/backend/app/http/posts.go @@ -9,7 +9,7 @@ import ( ) type ListQuery struct { - keyword *string `query:"keyword"` + Keyword *string `query:"keyword"` } // @provider @@ -20,7 +20,7 @@ type posts struct{} // @Bind pagination query // @Bind query query func (ctl *posts) List(ctx fiber.Ctx, pagination *requests.Pagination, query *ListQuery) (*requests.Pager, error) { - cond := models.Posts.BuildConditionWithKey(query.keyword) + cond := models.Posts.BuildConditionWithKey(query.Keyword) return models.Posts.List(ctx.Context(), pagination, cond) }