mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 16:06:21 +00:00
refactor: no throw literal in lolisafe.js
This commit is contained in:
parent
e2143b4d80
commit
5781c45a3d
@ -278,7 +278,8 @@ safe.use('/api', api)
|
||||
// ClamAV scanner
|
||||
if (config.uploads.scan && config.uploads.scan.enabled) {
|
||||
if (!config.uploads.scan.clamOptions) {
|
||||
throw 'Missing object config.uploads.scan.clamOptions (check config.sample.js)'
|
||||
logger.error('Missing object config.uploads.scan.clamOptions (check config.sample.js)')
|
||||
process.exit(1)
|
||||
}
|
||||
utils.clamscan.instance = await new ClamScan().init(config.uploads.scan.clamOptions)
|
||||
utils.clamscan.version = await utils.clamscan.instance.get_version().then(s => s.trim())
|
||||
|
Loading…
Reference in New Issue
Block a user