diff --git a/src/internal/server/handlers/attribute.go b/src/internal/server/handlers/attribute.go index 332daa1..fb922bf 100644 --- a/src/internal/server/handlers/attribute.go +++ b/src/internal/server/handlers/attribute.go @@ -12,6 +12,7 @@ import ( "kycnot.me/internal/database" "kycnot.me/internal/ent" "kycnot.me/internal/ent/attribute" + "kycnot.me/internal/ent/service" ) func Attribute(c iris.Context) { @@ -25,7 +26,9 @@ func Attribute(c iris.Context) { aa, err := database.Client().Attribute.Query(). Where(attribute.SlugEQ(slug)). Order(ent.Asc(attribute.FieldRating)). - WithServices(). + WithServices(func(sq *ent.ServiceQuery) { + sq.Where(service.PendingEQ(false)) + }). First(context.Background()) if err != nil { // Handle the error (e.g., service not found)