aaaa
This commit is contained in:
parent
d467f988f2
commit
a181ecfe79
|
@ -85,7 +85,7 @@ exports.save = async (ws, req) => {
|
||||||
fs.unlinkSync(`./videos/${id}.mp4`)
|
fs.unlinkSync(`./videos/${id}.mp4`)
|
||||||
|
|
||||||
const uploaded = await websocket.createDatabaseVideo(id, videoUrl)
|
const uploaded = await websocket.createDatabaseVideo(id, videoUrl)
|
||||||
if (!uploaded) {
|
if (uploaded != 'success') {
|
||||||
ws.send(`DATA - Error while uploading - ${JSON.stringify(uploaded)}`)
|
ws.send(`DATA - Error while uploading - ${JSON.stringify(uploaded)}`)
|
||||||
} else {
|
} else {
|
||||||
ws.send(`DONE - ${process.env.FRONTEND}/watch?v=${id}`)
|
ws.send(`DONE - ${process.env.FRONTEND}/watch?v=${id}`)
|
||||||
|
|
|
@ -31,7 +31,7 @@ async function createDatabaseVideo(id, videoUrl, playlistId) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return true
|
return 'success'
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { createDatabaseVideo }
|
module.exports = { createDatabaseVideo }
|
Loading…
Reference in New Issue