fix(dao): Remove unnecessary status filter conditions in user queries (#13698)

### What problem does this PR solve?

Fix: Enhanced the user deletion function to return detailed deletion
information.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2026-03-19 21:05:15 +08:00
committed by GitHub
parent cfe6ea6f56
commit e1dbfb8a9c
3 changed files with 61 additions and 12 deletions

View File

@@ -266,12 +266,18 @@ func (h *Handler) DeleteUser(c *gin.Context) {
return
}
if err := h.service.DeleteUser(username); err != nil {
result, err := h.service.DeleteUser(username)
if err != nil {
errorResponse(c, err.Error(), 500)
return
}
successNoData(c, "User deleted successfully")
detailsMsg := "Successfully deleted user. Details:\n"
for _, detail := range result.DeletedDetails {
detailsMsg += detail + "\n"
}
successNoData(c, detailsMsg)
}
// ChangePasswordHTTPRequest change password request