debugging
This commit is contained in:
parent
d90d6dced4
commit
d467f988f2
|
@ -84,9 +84,12 @@ exports.save = async (ws, req) => {
|
||||||
const videoUrl = await upload.uploadVideo(`./videos/${id}.mp4`)
|
const videoUrl = await upload.uploadVideo(`./videos/${id}.mp4`)
|
||||||
fs.unlinkSync(`./videos/${id}.mp4`)
|
fs.unlinkSync(`./videos/${id}.mp4`)
|
||||||
|
|
||||||
await websocket.createDatabaseVideo(id, videoUrl)
|
const uploaded = await websocket.createDatabaseVideo(id, videoUrl)
|
||||||
|
if (!uploaded) {
|
||||||
ws.send(`DONE - ${process.env.FRONTEND}/watch?v=${id}`)
|
ws.send(`DATA - Error while uploading - ${JSON.stringify(uploaded)}`)
|
||||||
|
} else {
|
||||||
|
ws.send(`DONE - ${process.env.FRONTEND}/watch?v=${id}`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await redis.del(id)
|
await redis.del(id)
|
||||||
|
|
Loading…
Reference in New Issue