mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-22 20:51:23 +01:00
fix: fixed issues with creating patch requests
This commit is contained in:
parent
e1b97643bd
commit
17ded5de4c
@ -25,7 +25,7 @@ const NewFolder = ({ collection, item, onClose }) => {
|
|||||||
if(item && item.uid) {
|
if(item && item.uid) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !(value.trim().toLowerCase().includes('environments'))
|
return value && !(value.trim().toLowerCase().includes('environments'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
@ -30,7 +30,7 @@ const NewRequest = ({ collection, item, isEphermal, onClose }) => {
|
|||||||
.test({
|
.test({
|
||||||
name: 'requestName',
|
name: 'requestName',
|
||||||
message: 'The request name "index" is reserved in bruno',
|
message: 'The request name "index" is reserved in bruno',
|
||||||
test: value => !(value.trim().toLowerCase().includes('index')),
|
test: value => value && !(value.trim().toLowerCase().includes('index')),
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
onSubmit: (values) => {
|
onSubmit: (values) => {
|
||||||
|
@ -57,11 +57,12 @@ const grammar = ohm.grammar(`Bru {
|
|||||||
|
|
||||||
meta = "meta" dictionary
|
meta = "meta" dictionary
|
||||||
|
|
||||||
http = get | post | put | delete | options | head | connect | trace
|
http = get | post | put | delete | patch | options | head | connect | trace
|
||||||
get = "get" dictionary
|
get = "get" dictionary
|
||||||
post = "post" dictionary
|
post = "post" dictionary
|
||||||
put = "put" dictionary
|
put = "put" dictionary
|
||||||
delete = "delete" dictionary
|
delete = "delete" dictionary
|
||||||
|
patch = "patch" dictionary
|
||||||
options = "options" dictionary
|
options = "options" dictionary
|
||||||
head = "head" dictionary
|
head = "head" dictionary
|
||||||
connect = "connect" dictionary
|
connect = "connect" dictionary
|
||||||
@ -237,6 +238,14 @@ const sem = grammar.createSemantics().addAttribute('ast', {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
patch(_1, dictionary) {
|
||||||
|
return {
|
||||||
|
http: {
|
||||||
|
method: 'patch',
|
||||||
|
...mapPairListToKeyValPair(dictionary.ast)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
options(_1, dictionary) {
|
options(_1, dictionary) {
|
||||||
return {
|
return {
|
||||||
http: {
|
http: {
|
||||||
|
Loading…
Reference in New Issue
Block a user