mirror of
https://github.com/laoxong/nofx.git
synced 2026-06-04 09:58:22 +08:00
feat: enhance strategy deletion process with user feedback and validation checks
This commit is contained in:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user