public async Task <IActionResult> ActivateAsync([FromBody] UserActivation userActivation) { var actionResponseBuilder = GetEmptyResponseBuilder <string>(); try { if (ModelState.IsValid) { var operationFlag = await _sessionService.ActivateAsync(userActivation); actionResponseBuilder.SetData(userActivation.Username); actionResponseBuilder.SetStatus(operationFlag); return(Ok(actionResponseBuilder.Build())); } else { return(BadRequest(ModelState)); } } catch (Exception ex) { actionResponseBuilder.AddError(new Common.Utilities.ErrorMessage(Common.Enums.ErrorType.Invalid, ex.Message)); return(BadRequest(actionResponseBuilder.Build())); } }