Skip to content

Commit 079d172

Browse files
committed
fixed merge conflict
2 parents 0250ba1 + 8c00076 commit 079d172

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

src/client/components/composer/NewRequest/ComposerNewRequest.jsx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,13 @@ class ComposerNewRequest extends Component {
171171
// grpc requests
172172
else if (this.props.newRequestFields.gRPC) {
173173

174+
174175
// saves all stream body queries to history & reqres request body
175176
let streamQueries = '';
176177
for (let i = 0; i < this.props.newRequestStreams.streamContent.length; i++) {
177178
streamQueries += `${this.props.newRequestStreams.streamContent[i]}`
178179
}
180+
179181
// define array to hold client query strings
180182
let queryArrStr = this.props.newRequestStreams.streamContent;
181183
let queryArr = [];
@@ -193,10 +195,13 @@ class ComposerNewRequest extends Component {
193195
const grpcStream = document.getElementById('stream').innerText;
194196

195197
// create reqres obj to be passed to controller for further actions/tasks
198+
196199
reqRes = {
197200
id: uuid(),
198201
created_at: new Date(),
202+
199203
protocol: '',
204+
200205
url: this.props.newRequestFields.url,
201206
graphQL: this.props.newRequestFields.graphQL,
202207
gRPC: this.props.newRequestFields.gRPC,
@@ -291,13 +296,48 @@ class ComposerNewRequest extends Component {
291296
JSONFormatted: true,
292297
});
293298

299+
if (this.props.newRequestFields.gRPC) {
300+
this.props.setNewRequestBody({
301+
...this.newRequestBody,
302+
bodyContent: '',
303+
bodyVariables: '',
304+
bodyType: 'GRPC',
305+
rawType: '',
306+
JSONFormatted: true,
307+
});
308+
}
309+
310+
if (this.props.newRequestFields.graphQL) {
311+
312+
this.props.setNewRequestBody({
313+
...this.newRequestBody,
314+
bodyContent: '',
315+
bodyVariables: '',
316+
bodyType: 'GQL',
317+
rawType: '',
318+
JSONFormatted: true,
319+
});
320+
}
321+
294322
this.props.setNewRequestFields({
295323
method: this.props.newRequestFields.method,
296324
protocol: '',
297325
url: '',
298326
graphQL: this.props.newRequestFields.graphQL,
299327
gRPC: this.props.newRequestFields.gRPC,
300328
});
329+
330+
if(this.props.newRequestFields.protocol === 'ws://') {
331+
this.props.setNewRequestFields({
332+
method: this.props.newRequestFields.method,
333+
protocol: 'ws://',
334+
url: 'ws://',
335+
graphQL: this.props.newRequestFields.graphQL,
336+
gRPC: this.props.newRequestFields.gRPC,
337+
});
338+
}
339+
340+
301341
this.props.setNewRequestSSE(false);
302342
}
303343
else {

src/client/components/composer/NewRequest/FieldEntryForm.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ class FieldEntryForm extends Component {
172172
// }
173173

174174
render() {
175-
// console.log('what is this field entry form', this.props.newRequestFields)
176-
177175

178176
return (
179177
<div>

src/client/components/composer/NewRequest/HeaderEntryForm.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class HeaderEntryForm extends Component {
2424
this.addHeader(headersDeepCopy);
2525
}
2626
this.checkContentTypeHeaderUpdate();
27+
2728
}
2829

2930
checkContentTypeHeaderUpdate() {

src/client/components/display/History.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ class History extends Component {
1212
}
1313

1414
addHistoryToNewRequest() {
15-
console.log('this is the content', this.props.content)
1615

1716
const requestFieldObj = {
1817
method: this.props.content.request.method ? this.props.content.request.method : 'GET',
1918
protocol: this.props.content.protocol ? this.props.content.protocol : 'http://',
2019
url: this.props.content.url ? this.props.content.url : 'http://',
2120
graphQL: this.props.content.graphQL ? this.props.content.graphQL : false,
22-
gRPC: this.props.content.protocol === '' ? true : null
21+
gRPC: this.props.content.gRPC ? this.props.content.gRPC : false
2322
}
2423

2524

0 commit comments

Comments
 (0)