fix: filter active in news

This commit is contained in:
ericprd
2025-03-20 13:13:28 +08:00
parent 8d7500610e
commit 24f0fe6efa
5 changed files with 33 additions and 8 deletions
+6 -1
View File
@@ -23,8 +23,13 @@ func GetAll(
category := query.Get("categories")
tags := query.Get("tags")
activeOnly := query.Get("active")
news, err = newsSvc.GetAll(category, tags)
news, err = newsSvc.GetAll(newsdomain.Filter{
Category: category,
Tags: tags,
Active: activeOnly,
})
if err != nil {
response.ResponseWithErrorCode(