mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-04-05 00:44:18 -04:00
18 lines
329 B
JavaScript
18 lines
329 B
JavaScript
/**
|
|
* Import base modules
|
|
*/
|
|
const fs = require('fs');
|
|
|
|
/**
|
|
* Get an option from external config (Home Assistant)
|
|
*
|
|
* @param option
|
|
*/
|
|
module.exports = (option) => {
|
|
if (fs.existsSync('/data/options.json')) {
|
|
return JSON.parse(fs.readFileSync('/data/options.json', 'utf-8'))[option];
|
|
}
|
|
|
|
return null;
|
|
};
|