This commit is contained in:
localhost 2024-05-25 15:37:12 +02:00
parent d467f988f2
commit a181ecfe79
2 changed files with 2 additions and 2 deletions

View File

@ -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}`)

View File

@ -31,7 +31,7 @@ async function createDatabaseVideo(id, videoUrl, playlistId) {
} }
}) })
return true return 'success'
} }
module.exports = { createDatabaseVideo } module.exports = { createDatabaseVideo }