add web api access key
This commit is contained in:
parent
948541c1aa
commit
0aad260946
@ -90,6 +90,9 @@ router
|
|||||||
printer: {
|
printer: {
|
||||||
serial: '',
|
serial: '',
|
||||||
feed: 8
|
feed: 8
|
||||||
|
},
|
||||||
|
api: {
|
||||||
|
secret: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,6 +104,8 @@ router
|
|||||||
json.printer.serial = arr.tty
|
json.printer.serial = arr.tty
|
||||||
json.printer.feed = feed
|
json.printer.feed = feed
|
||||||
|
|
||||||
|
json.api.secret = arr.secret || ''
|
||||||
|
|
||||||
let wconfig = await new Promise((resolve, reject) => {
|
let wconfig = await new Promise((resolve, reject) => {
|
||||||
fs.writeFile(path.resolve(process.env.PROJECT_ROOT, 'config.json'), JSON.stringify(json, null, 2), {
|
fs.writeFile(path.resolve(process.env.PROJECT_ROOT, 'config.json'), JSON.stringify(json, null, 2), {
|
||||||
mode: 0o664,
|
mode: 0o664,
|
||||||
|
Loading…
Reference in New Issue
Block a user