chore: stabilize chatwoot parity baseline
This commit is contained in:
@@ -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})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user