aziendasanitaria-utils 1.2.21 → 1.2.22
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.
package/package.json
CHANGED
|
@@ -253,10 +253,10 @@ export class Nar2 {
|
|
|
253
253
|
});
|
|
254
254
|
} else {
|
|
255
255
|
out = await axios.get(Nar2.GET_WS_FALLBACK_INTERNAL.replace("{cf}", cf).replace("{token}", Nar2.#token).replace("{type}", "sogei"));
|
|
256
|
-
out = out.sogei;
|
|
256
|
+
out.data = {status: out.data.sogei.status || false, data: out.data.sogei.data};
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
if (out.data === undefined || out.data.status.toString().toLowerCase().includes("token is invalid"))
|
|
259
|
+
if (!out.data || out.data === undefined || (fallback && out.data.status.toString().toLowerCase().includes("token is invalid")))
|
|
260
260
|
await this.getToken(true);
|
|
261
261
|
else if (out.data.status.toString() !== "true" && out.data.listaMessaggi.p801descrizioneMessaggio.includes("errato")) {
|
|
262
262
|
assistito.okTs = false;
|