refactor: remove remote label number fetching and default number to 1 in label print service
Build and Push Multi-Platform Images / build-and-push (push) Successful in 28s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 28s
This commit is contained in:
@@ -173,15 +173,7 @@ export class LabelPrintAgentService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (template.LabelGetUrl) {
|
vars['number'] = '1';
|
||||||
const url = applyVars(template.LabelGetUrl, vars);
|
|
||||||
try {
|
|
||||||
vars['number'] = (await (await fetch(url)).text()).trim();
|
|
||||||
} catch (err: any) {
|
|
||||||
this.logger.warn(`GET-URL fehlgeschlagen (${url}): ${err.message}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!('number' in vars)) vars['number'] = '1';
|
|
||||||
|
|
||||||
return this.renderer.render(
|
return this.renderer.render(
|
||||||
template.LabelLayout,
|
template.LabelLayout,
|
||||||
|
|||||||
Reference in New Issue
Block a user