public async Task <ActionResult <SuccessResponse> > ContactUsAsync(ContactUsRequest model) { int code = 200; BaseResponse response = null; try { await _emailService.ContactUs(model); response = new SuccessResponse(); } catch (Exception ex) { code = 500; response = new ErrorResponse(ex.Message); } return(StatusCode(code, response)); }
public async Task <ActionResult <ItemResponse <EmailResponse> > > ContactUs(EmailAddRequest model) { int code = 200; BaseResponse response = null; try { EmailResponse item = await _service.ContactUs(model); response = new SuccessResponse(); } catch (Exception ex) { response = new ErrorResponse(ex.Message); code = 500; } return(StatusCode(code, response)); }