diff --git a/route/install.js b/route/install.js index 47ce3a7..cbf1731 100644 --- a/route/install.js +++ b/route/install.js @@ -90,6 +90,9 @@ router printer: { serial: '', feed: 8 + }, + api: { + secret: '' } } @@ -101,6 +104,8 @@ router json.printer.serial = arr.tty json.printer.feed = feed + json.api.secret = arr.secret || '' + let wconfig = await new Promise((resolve, reject) => { fs.writeFile(path.resolve(process.env.PROJECT_ROOT, 'config.json'), JSON.stringify(json, null, 2), { mode: 0o664,