fix(notify): per-recipient timeout and return user on email removal
- Use per-recipient context timeout in sendEmails to prevent later recipients from failing due to shared timeout exhaustion - Return updated user object from RemoveNotifyEmail handler for frontend state consistency (matching VerifyNotifyEmail pattern)
This commit is contained in:
@@ -205,5 +205,12 @@ func (h *UserHandler) RemoveNotifyEmail(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
response.Success(c, gin.H{"message": "Email removed successfully"})
|
||||
// Return updated user
|
||||
updatedUser, err := h.userService.GetByID(c.Request.Context(), subject.UserID)
|
||||
if err != nil {
|
||||
response.ErrorFrom(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
response.Success(c, dto.UserFromService(updatedUser))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user