chore: stabilize chatwoot parity baseline

This commit is contained in:
2026-06-04 18:12:50 +08:00
parent 8ac150bc7b
commit 42cdab880c
39 changed files with 1028 additions and 696 deletions
+3 -3
View File
@@ -68,7 +68,7 @@ func (h *MFAHandler) EnableMFA(c *gin.Context) {
// Check if MFA is already enabled
enabled, err := h.mfaService.IsMFAEnabled(userID)
if err != nil {
response.AbortWithStatusError(c, http.StatusInternalServerError, response.ErrInternal, err.Error())
response.AbortWithStatusError(c, http.StatusUnprocessableEntity, response.ErrInternal, err.Error())
return
}
if enabled {
@@ -79,7 +79,7 @@ func (h *MFAHandler) EnableMFA(c *gin.Context) {
// Generate new TOTP secret + QR URI
secret, qrURI, err := h.mfaService.GenerateTOTPSecret(userID)
if err != nil {
response.AbortWithStatusError(c, http.StatusInternalServerError, response.ErrInternal, err.Error())
response.AbortWithStatusError(c, http.StatusUnprocessableEntity, response.ErrInternal, err.Error())
return
}
@@ -202,4 +202,4 @@ func (h *MFAHandler) BackupCodes(c *gin.Context) {
return
}
c.JSON(http.StatusOK, gin.H{"backup_codes": codes})
}
}