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 2020/11/05 14:19:47 UTC

[GitHub] [apisix-dashboard] membphis commented on a change in pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

membphis commented on a change in pull request #704:
URL: https://github.com/apache/apisix-dashboard/pull/704#discussion_r518085397



##########
File path: api/internal/handler/route/route.go
##########
@@ -304,6 +304,14 @@ func (h *Handler) Update(c droplet.Context) (interface{}, error) {
 				return handler.SpecCodeResponse(err), err
 			}
 		}
+	} else {
+		//remove exists script
+		script, _ := h.scriptStore.Get(input.Route.ID)
+		if script != nil {
+			if err := h.scriptStore.BatchDelete(c.Context(), strings.Split(input.Route.ID, ",")); err != nil {
+				log.Warnf("try to delete script %s again", input.Route.ID)

Review comment:
       should we write the error message to log file?




----------------------------------------------------------------
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