starsz commented on a change in pull request #1606:
URL: https://github.com/apache/apisix-dashboard/pull/1606#discussion_r595876692



##########
File path: api/internal/handler/route/route.go
##########
@@ -489,12 +503,32 @@ func (h *Handler) Update(c droplet.Context) (interface{}, 
error) {
                }
        }
 
-       ret, err := h.routeStore.Update(c.Context(), &input.Route, true)
+       // check name existed
+       ret, err := h.routeStore.List(c.Context(), store.ListInput{

Review comment:
       Good idea.

##########
File path: api/internal/handler/route/route.go
##########
@@ -489,12 +503,32 @@ func (h *Handler) Update(c droplet.Context) (interface{}, 
error) {
                }
        }
 
-       ret, err := h.routeStore.Update(c.Context(), &input.Route, true)
+       // check name existed
+       ret, err := h.routeStore.List(c.Context(), store.ListInput{

Review comment:
       We can use reflection to get the name filed.




----------------------------------------------------------------
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:
[email protected]


Reply via email to