re-factor / cleanup
This commit is contained in:
@@ -542,7 +542,7 @@ export default {
|
||||
r = await that.extractBodyEx(r);
|
||||
return r;
|
||||
} catch (error) {
|
||||
handleError("POSTATTACHMENT", error, route);
|
||||
handleError("POSTATTACHMENT", error, "uploadAttachmentRoute");
|
||||
}
|
||||
},
|
||||
//////////////////////////////////////////////
|
||||
@@ -616,7 +616,7 @@ export default {
|
||||
r = await that.extractBodyEx(r);
|
||||
return r;
|
||||
} catch (error) {
|
||||
handleError("uploadLogo", error, route);
|
||||
handleError("uploadLogo", error, "postLogoRoute");
|
||||
}
|
||||
},
|
||||
///////////////////////////////////
|
||||
@@ -633,7 +633,6 @@ export default {
|
||||
LanguageName: window.$gz.locale.getResolvedLanguage(),
|
||||
Hour12: window.$gz.locale.getHour12(),
|
||||
CurrencyName: window.$gz.locale.getCurrencyName(),
|
||||
LanguageName: window.$gz.locale.getResolvedLanguage(),
|
||||
DefaultLocale: window.$gz.locale.getResolvedLanguage().split("-", 1)[0], //kind of suspect, maybe it can be removed
|
||||
PDFDate: window.$gz.locale.utcDateToShortDateLocalized(nowUtc),
|
||||
PDFTime: window.$gz.locale.utcDateToShortTimeLocalized(nowUtc)
|
||||
@@ -646,7 +645,7 @@ export default {
|
||||
async fetchBizObjectName(ayaType, objectId) {
|
||||
const res = await this.get(`name/${ayaType}/${objectId}`);
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
if (!Object.prototype.hasOwnProperty.call(res, "data")) {
|
||||
return Promise.reject(res);
|
||||
} else {
|
||||
return res.data;
|
||||
|
||||
Reference in New Issue
Block a user