Skip to content

Commit

Permalink
fix(ui): Sidebar > Right click > curl import > body not imported
Browse files Browse the repository at this point in the history
  • Loading branch information
flawiddsouza committed Jan 30, 2025
1 parent f30f28d commit d1acf90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/ui/src/components/ImportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
v-model="inputString"
placeholder="Paste curl request here"
style="min-height: 20rem;"
spellcheck="false"
/>

<p v-if="inputString && !startsWithCurl">
Expand Down Expand Up @@ -384,10 +385,10 @@ export default {
type: 'request',
name: 'New request',
method: result[0].method,
mimeType: result[0].body.mimeType,
parentId: this.selectedRequestGroupId,
headers: result[0].headers,
url: result[0].url,
body: result[0].body,
})
this.$toast.success('Imported successfully')
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ export const store = createStore<State>({
_type: 'request',
name: payload.name,
method: payload.method,
body: {
body: payload.body ? payload.body : {
mimeType: payload.mimeType
},
parentId: payload.parentId,
Expand Down

0 comments on commit d1acf90

Please sign in to comment.