debugging
This commit is contained in:
		
							parent
							
								
									d90d6dced4
								
							
						
					
					
						commit
						d467f988f2
					
				| 
						 | 
					@ -84,10 +84,13 @@ 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(`DATA - Error while uploading - ${JSON.stringify(uploaded)}`)
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
                    ws.send(`DONE - ${process.env.FRONTEND}/watch?v=${id}`)
 | 
					                    ws.send(`DONE - ${process.env.FRONTEND}/watch?v=${id}`)
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            await redis.del(id)
 | 
					            await redis.del(id)
 | 
				
			||||||
            ws.close();
 | 
					            ws.close();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue