mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
resolve linting issues in the zpl converter operation
This commit is contained in:
parent
02ea4bf1c9
commit
adf73aa251
1 changed files with 3 additions and 3 deletions
|
@ -75,10 +75,10 @@ class ZPLConvert extends Operation {
|
||||||
// The first segment of the resolution arg is the numeric indicator of the resolution
|
// The first segment of the resolution arg is the numeric indicator of the resolution
|
||||||
const labelResolution = labelResolutionArg.toString().split(" ")[0];
|
const labelResolution = labelResolutionArg.toString().split(" ")[0];
|
||||||
|
|
||||||
const labelaryUrl = `${labelaryApi}/v1/printers/${labelResolution}dpmm/labels/${widthArg}x${heightArg}/${index}`
|
const labelaryUrl = `${labelaryApi}/v1/printers/${labelResolution}dpmm/labels/${widthArg}x${heightArg}/${index}`;
|
||||||
|
|
||||||
return fetch(labelaryUrl, {
|
return fetch(labelaryUrl, {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
headers: {"accept": "image/png", "Content-Type": "application/x-www-form-urlencoded"},
|
headers: {"accept": "image/png", "Content-Type": "application/x-www-form-urlencoded"},
|
||||||
body: input,
|
body: input,
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
@ -90,7 +90,7 @@ class ZPLConvert extends Operation {
|
||||||
}
|
}
|
||||||
return response.blob();
|
return response.blob();
|
||||||
}).then(blob => {
|
}).then(blob => {
|
||||||
return blob.arrayBuffer()
|
return blob.arrayBuffer();
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
return data;
|
return data;
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue