public string Render() { var page = new StandardResponse { Succeeded = false, Code = Exception.Code, Information = Exception.Information, Message = Exception.Message, Developer = Exception.Developer, Payload = null }; return JsonConvert.SerializeObject(page); }
public async Task<StandardResponse> Register([FromBody] RegisterRequestModel user) { if (user == null) throw new ParameterNullException(nameof(user)); var constructed = user.Generate(); var model = await UserService.AddUser(constructed); await EmailService.SendEmail(new ActivationEmail(user.Email, model.Token, "api.inkysigma.com/activate", "inkysigma.com/activate")); var response = new StandardResponse { Succeeded = true, Code = 200, Message = "Please check your email for a confirmation email", Payload = null }; return response; }