You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/01/05 07:49:22 UTC

[GitHub] [apisix-dashboard] Jaycean commented on a change in pull request #1207: fix(be): search by status on the route list page is invalid

Jaycean commented on a change in pull request #1207:
URL: https://github.com/apache/apisix-dashboard/pull/1207#discussion_r551765815



##########
File path: api/internal/handler/route/route.go
##########
@@ -218,7 +220,11 @@ func (h *Handler) List(c droplet.Context) (interface{}, error) {
 			if input.Label != "" && !utils.LabelContains(obj.(*entity.Route).Labels, labelMap) {
 				return false
 			}
-
+			
+		        status, _ := strconv.Atoi(input.Status)
+			if input.Status != "" && uint8(obj.(*entity.Route).Status) != uint8(status) {

Review comment:
       Yes, but my biggest problem now is that no matter whether I use uint8 or string for comparison, my test cases can't pass. There's no problem with the function itself. Can you help me take a look at my test cases?  Thks




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org