changes
This commit is contained in:
@@ -6,10 +6,10 @@ const execFileAsync = promisify(execFile);
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const body = await readBody(event);
|
||||
const { name, imei, price } = body;
|
||||
const { items } = body;
|
||||
|
||||
const scriptPath = path.join(process.cwd(), "print", "print_barcode.py");
|
||||
const payload = JSON.stringify({ name, imei, price });
|
||||
const payload = JSON.stringify({ items });
|
||||
|
||||
try {
|
||||
const { stdout } = await execFileAsync("python", [scriptPath, payload]);
|
||||
|
||||
Reference in New Issue
Block a user