This commit is contained in:
2020-12-22 16:09:35 +00:00
parent 1ad5246fba
commit 048fd308c7
4 changed files with 52 additions and 31 deletions

View File

@@ -710,6 +710,22 @@ export default {
}
}
}
},
///////////////////////////////////
// FETCH BIZ OBJECT NAME
//
//
async fetchBizObjectName(ayaType, objectId) {
//todo: this is a good candidate for a light weight cache
//maybe one hour or something to invalidate and volatile on refresh
let res = await this.get(`name/${ayaType}/${objectId}`);
//We never expect there to be no data here
if (!res.hasOwnProperty("data")) {
return Promise.reject(res);
} else {
return res.data;
}
}
//---------------