public async Task <IActionResult> GetTableSchemaInfo(String tableName) { try { if (ModelState.IsValid) { GetTableSchemaInfoResponse response = new GetTableSchemaInfoResponse(); var res = await _adminService.GetTableSchemaInfo(tableName); response.ResponseData = res; response.ResponseCode = ResponseCodes.Success; response.ResponseMessage = SystemMessagesHelper.RecordsReturnedSuccessfully; return(Ok(response)); } else { return(BadRequest(ModelState)); } } catch (Exception ex) { SerilogLogs.LogError(SerilogKeywordProject.GHMS, SerilogKeywordController.Admin, SerilogKeywordAction.Login, null, ex); return(StatusCode((int)ResponseCodes.Error)); } }
public async Task <IActionResult> Login([FromBody] LoginRequest login) { try { if (ModelState.IsValid) { IActionResult response = Unauthorized(); var res = await AuthenticateUser(login); return(Ok(res)); } else { return(BadRequest(ModelState)); } } catch (Exception ex) { SerilogLogs.LogError(SerilogKeywordProject.GHMS, SerilogKeywordController.Account, SerilogKeywordAction.Login, null, ex); return(StatusCode((int)ResponseCodes.Error)); } }