fix: auth
Some checks failed
build quyun / Build (push) Failing after 1m26s

This commit is contained in:
2025-12-20 11:18:59 +08:00
parent c42f2c651f
commit fdbf26d751
6 changed files with 71 additions and 97 deletions

View File

@@ -257,7 +257,11 @@ func (ctl *posts) Mine(
conds := []gen.Condition{
models.PostQuery.Status.Eq(fields.PostStatusPublished),
models.PostQuery.Title.Like(database.WrapLike(*query.Keyword)),
}
if query.Keyword != nil && *query.Keyword != "" {
conds = append(conds,
models.PostQuery.Title.Like(database.WrapLike(*query.Keyword)),
)
}
pager, err := services.Users.PostList(ctx, user.ID, pagination, conds...)