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) {
|
||||
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';
|
||||
vars['number'] = '1';
|
||||
|
||||
return this.renderer.render(
|
||||
template.LabelLayout,
|
||||
|
||||
Reference in New Issue
Block a user