cleanup res.error overly complex
This commit is contained in:
@@ -731,7 +731,7 @@ export default {
|
||||
.upsert(url, lvSave)
|
||||
.then(res => {
|
||||
vm.formState.loading = false;
|
||||
if (res.error != undefined) {
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
@@ -798,7 +798,7 @@ export default {
|
||||
window.$gz.api
|
||||
.remove(url)
|
||||
.then(res => {
|
||||
if (res.error != undefined) {
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
@@ -845,7 +845,7 @@ export default {
|
||||
.then(res => {
|
||||
// debugger;
|
||||
vm.formState.loading = false;
|
||||
if (res.error != undefined) {
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
@@ -1184,7 +1184,7 @@ function populateFieldDefinitions(vm) {
|
||||
return window.$gz.api
|
||||
.get("DataList/ListFields?DataListKey=" + vm.dataListKey)
|
||||
.then(res => {
|
||||
if (res.error != undefined) {
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
} else {
|
||||
vm.fieldDefinitions = res.data;
|
||||
@@ -1241,7 +1241,7 @@ function setEffectiveListView(vm) {
|
||||
return window.$gz.api
|
||||
.get("DataListView/default/" + vm.dataListKey)
|
||||
.then(res => {
|
||||
if (res.error != undefined) {
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
} else {
|
||||
vm.effectiveListView = JSON.parse(res.data);
|
||||
@@ -1251,7 +1251,7 @@ function setEffectiveListView(vm) {
|
||||
} else {
|
||||
//listview has an id value
|
||||
return window.$gz.api.get("DataListView/" + vm.listViewId).then(res => {
|
||||
if (res.error != undefined) {
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
} else {
|
||||
vm.effectiveListView = JSON.parse(res.data.listView);
|
||||
|
||||
Reference in New Issue
Block a user