Template.measurementTable.onCreated(() => {
const instance = Template.instance();
const patientName=instance.data.studies[0].patientName;
xnatInstance.get(`http://10.2.10.106:5199/mri/predict?pid=${patientName}`).then((respose)=> {
console.log(respose.data.msg);
instance.datas=respose.data.msg;
});
instance.datas="GX";
});
Template.measurementTable.helpers({
datas() {
const instance = Template.instance();
if (instance.datas!=="GX") {
return instance.datas;
}
return instance.datas;
}
});
what is returned now is that the content that GX, wants to return is the request result, but in the callback of the result, what should be done if the GX, is returned in the order of execution? How should I write it in async and await?