mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
Fix/example naming (#6002)
* fix: example naming * fix: request not being saved when initialized with empty url * remove check for method * fix: improve the logic for get initial name * fix test
This commit is contained in:
@@ -44,14 +44,9 @@ const jsonToExampleBru = (json) => {
|
||||
// Request block
|
||||
bru += '\nrequest: {\n';
|
||||
|
||||
if (url) {
|
||||
bru += ` url: ${url}\n`;
|
||||
}
|
||||
bru += ` url: ${url}\n`;
|
||||
|
||||
// Add method field right after url
|
||||
if (method) {
|
||||
bru += ` method: ${method}\n`;
|
||||
}
|
||||
bru += ` method: ${method}\n`;
|
||||
|
||||
// Add mode field inside request block, right after method
|
||||
if (request && request.body && request.body.mode) {
|
||||
|
||||
Reference in New Issue
Block a user