feat: disable bulk edit entries with //

This commit is contained in:
liyasthomas
2021-08-30 18:35:33 +05:30
parent 174ba90fb5
commit b9fa254ab5
3 changed files with 11 additions and 15 deletions

View File

@@ -224,13 +224,11 @@ export default defineComponent({
watch(bulkHeaders, () => {
try {
const transformation = bulkHeaders.value.split("\n").map((item) => {
return {
key: item.substr(0, item.indexOf(":")).trim(),
value: item.substr(item.indexOf(":") + 1).trim(),
active: true,
}
})
const transformation = bulkHeaders.value.split("\n").map((item) => ({
key: item.substr(0, item.indexOf(":")).trim(),
value: item.substr(item.indexOf(":") + 1).trim(),
active: !item.trim().startsWith("//"),
}))
setRESTHeaders(transformation)
} catch (e) {
$toast.error(t("error.something_went_wrong").toString(), {

View File

@@ -232,13 +232,11 @@ export default defineComponent({
watch(bulkParams, () => {
try {
const transformation = bulkParams.value.split("\n").map((item) => {
return {
key: item.substr(0, item.indexOf(":")).trim(),
value: item.substr(item.indexOf(":") + 1).trim(),
active: true,
}
})
const transformation = bulkParams.value.split("\n").map((item) => ({
key: item.substr(0, item.indexOf(":")).trim(),
value: item.substr(item.indexOf(":") + 1).trim(),
active: !item.trim().startsWith("//"),
}))
setRESTParams(transformation)
} catch (e) {
$toast.error(t("error.something_went_wrong").toString(), {