1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Error handling mini refractoring

This commit is contained in:
Chocobozzz 2016-02-05 19:02:05 +01:00
parent dac0a5319a
commit 8425cb894d
12 changed files with 86 additions and 58 deletions

View file

@ -39,13 +39,13 @@
fs.readFile(peertubeCrypto.getCertDir() + 'peertube.pub', 'utf8', function (err, cert) {
if (err) {
logger.error('Cannot read cert file.', { error: err })
logger.error('Cannot read cert file.')
return next(err)
}
Videos.listOwned(function (err, videos_list) {
if (err) {
logger.error('Cannot get the list of owned videos.', { error: err })
logger.error('Cannot get the list of owned videos.')
return next(err)
}
@ -78,7 +78,8 @@
Videos.removeAllRemotesOf(url, function (err) {
if (err) logger.error('Cannot remove all remote videos of %s.', url)
logger.info('%s pod removed.', url)
else logger.info('%s pod removed.', url)
res.sendStatus(204)
})
})