feat: enhance strategy deletion process with user feedback and validation checks

This commit is contained in:
Dean
2026-03-27 13:51:32 +08:00
committed by shinchan-zhai
parent b331733e23
commit 6cb6c31b34
6 changed files with 121 additions and 40 deletions
+1 -1
View File
@@ -344,7 +344,7 @@ func (s *Server) handleDeleteStrategy(c *gin.Context) {
}
if err := s.store.Strategy().Delete(userID, strategyID); err != nil {
SafeInternalError(c, "Failed to delete strategy", err)
c.JSON(http.StatusBadRequest, gin.H{"error": SanitizeError(err, "Failed to delete strategy")})
return
}