This commit is contained in:
@@ -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...)
|
||||
|
||||
Reference in New Issue
Block a user