Commit inicial

This commit is contained in:
2022-12-08 16:53:35 -06:00
commit cf9daf2193
36 changed files with 11355 additions and 0 deletions

21
middleware/client.js Normal file
View File

@@ -0,0 +1,21 @@
const middlewareClient = (client = null) => async (req, res, next) => {
try {
if(!client){
res.status(409)
console.log(client)
res.send({ error: 'Error de client.' })
}else{
req.clientWs = client;
next()
}
} catch (e) {
console.log(e)
res.status(409)
res.send({ error: 'Error de client' })
}
}
module.exports = { middlewareClient }

0
middleware/db.js Normal file
View File