ntk-cms-api 20.25.44 → 20.25.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1148,7 +1148,7 @@ class ApiServerBase {
1148
1148
  this.keyBaseVer = 'Ver';
1149
1149
  this.accessLoad = false;
1150
1150
  this.cachApiResult = [];
1151
- this.apiCallStatusInRunResult = [];
1151
+ this.cachApiInRunResult = [];
1152
1152
  this.childConstructor();
1153
1153
  this.headers = new Map();
1154
1154
  }
@@ -1161,11 +1161,11 @@ class ApiServerBase {
1161
1161
  get Ver() {
1162
1162
  return localStorage.getItem(this.keyBaseVer) + '_';
1163
1163
  }
1164
- async cashApiIsValid(serviceNameKay, cashApiSeconds = 0) {
1164
+ cashApiIsValid(serviceNameKay, cashApiSeconds = 0) {
1165
1165
  if (cashApiSeconds > 0) {
1166
- while (this.apiCallStatusInRunResult[serviceNameKay]?.getTime() >
1166
+ while (this.cachApiInRunResult[serviceNameKay]?.getTime() >
1167
1167
  new Date().getTime() - 10000) {
1168
- await new Promise((resolve) => setTimeout(resolve, 100));
1168
+ /* this.delay(1000).;*/
1169
1169
  }
1170
1170
  if (!this.cachApiResult[serviceNameKay])
1171
1171
  return false;
@@ -1175,15 +1175,15 @@ class ApiServerBase {
1175
1175
  new Date().getTime() - this.cachApiResult[serviceNameKay].dateResult <
1176
1176
  cashApiSeconds)
1177
1177
  return true;
1178
- this.apiCallStatusInRunResult[serviceNameKay] = new Date();
1178
+ this.cachApiInRunResult[serviceNameKay] = new Date();
1179
1179
  }
1180
1180
  return false;
1181
1181
  }
1182
- async cashApiVlaueSet(serviceNameKay, ret) {
1182
+ cashApiVlaueSet(serviceNameKay, ret) {
1183
1183
  this.cachApiResult[serviceNameKay] = ret;
1184
1184
  this.cachApiResult[serviceNameKay].dateResult = new Date();
1185
- this.apiCallStatusInRunResult[serviceNameKay] = undefined;
1186
- delete this.apiCallStatusInRunResult[serviceNameKay];
1185
+ this.cachApiInRunResult[serviceNameKay] = undefined;
1186
+ delete this.cachApiInRunResult[serviceNameKay];
1187
1187
  }
1188
1188
  childConstructor() {
1189
1189
  // test
@@ -1561,7 +1561,7 @@ class ApiCmsServerBase extends ApiServerBase {
1561
1561
  return ret;
1562
1562
  }));
1563
1563
  }
1564
- async ServiceGetOneById(id, cashApiSeconds = 0) {
1564
+ ServiceGetOneById(id, cashApiSeconds = 0) {
1565
1565
  //! optimaze call api
1566
1566
  const serviceNameKay = this.constructor.name + '_ServiceGetOneById_' + id;
1567
1567
  if (this.cashApiIsValid(serviceNameKay, cashApiSeconds))