Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bstewartlg committed May 17, 2024
1 parent 7406c5e commit 3d8face
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
3 changes: 1 addition & 2 deletions src/components/RequestBox/RequestBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export default class RequestBox extends Component {
};

submitAction = async () => {
console.log("submitAction", this.state.request);
if (!_.isEmpty(this.state.request)) {
let response = await this.props.submitInfo(
this.prepPrefetch(),
Expand All @@ -92,7 +91,7 @@ export default class RequestBox extends Component {

console.log("submitAction response", response);

if (!!response.systemActions && response.systemActions.length > 0) {
if (!!response && !!response.systemActions && response.systemActions.length > 0) {
console.log("submitAction systemActions", response.systemActions);

// find a resource in the system actions with the CRD coverage information extension
Expand Down
20 changes: 0 additions & 20 deletions src/containers/RequestBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,26 +135,6 @@ export default class RequestBuilder extends Component {
});
this.consoleLog("Fetching response from " + cdsUrl, types.info);
try {
// fetch(cdsUrl, {
// method: "POST",
// headers: myHeaders,
// body: JSON.stringify(json_request)
// }).then(response => {
// this.consoleLog("Received response", types.info);
// response.json().then((fhirResponse) => {
// console.log(fhirResponse);
// if (fhirResponse && fhirResponse.status) {
// this.consoleLog("Server returned status "
// + fhirResponse.status + ": "
// + fhirResponse.error, types.error);
// this.consoleLog(fhirResponse.message, types.error);
// } else {
// this.setState({ response: fhirResponse });
// }
// this.setState({ loading: false });
// })
// }).catch(() => this.consoleLog("No response recieved from the server", types.error));

try {
let response = await fetch(cdsUrl, {
method: "POST",
Expand Down

0 comments on commit 3d8face

Please sign in to comment.