Skip to content

Commit 3d8face

Browse files
committed
Cleanup
1 parent 7406c5e commit 3d8face

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

src/components/RequestBox/RequestBox.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export default class RequestBox extends Component {
7979
};
8080

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

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

95-
if (!!response.systemActions && response.systemActions.length > 0) {
94+
if (!!response && !!response.systemActions && response.systemActions.length > 0) {
9695
console.log("submitAction systemActions", response.systemActions);
9796

9897
// find a resource in the system actions with the CRD coverage information extension

src/containers/RequestBuilder.js

-20
Original file line numberDiff line numberDiff line change
@@ -135,26 +135,6 @@ export default class RequestBuilder extends Component {
135135
});
136136
this.consoleLog("Fetching response from " + cdsUrl, types.info);
137137
try {
138-
// fetch(cdsUrl, {
139-
// method: "POST",
140-
// headers: myHeaders,
141-
// body: JSON.stringify(json_request)
142-
// }).then(response => {
143-
// this.consoleLog("Received response", types.info);
144-
// response.json().then((fhirResponse) => {
145-
// console.log(fhirResponse);
146-
// if (fhirResponse && fhirResponse.status) {
147-
// this.consoleLog("Server returned status "
148-
// + fhirResponse.status + ": "
149-
// + fhirResponse.error, types.error);
150-
// this.consoleLog(fhirResponse.message, types.error);
151-
// } else {
152-
// this.setState({ response: fhirResponse });
153-
// }
154-
// this.setState({ loading: false });
155-
// })
156-
// }).catch(() => this.consoleLog("No response recieved from the server", types.error));
157-
158138
try {
159139
let response = await fetch(cdsUrl, {
160140
method: "POST",

0 commit comments

Comments
 (0)