removed unnecessary login from rest api
authorselfhoster <selfhoster@protonmail.com>
Thu, 28 Nov 2019 08:09:17 +0000 (19:09 +1100)
committerselfhoster <selfhoster@protonmail.com>
Thu, 28 Nov 2019 08:09:17 +0000 (19:09 +1100)
app/app.js

index 0117e05bf01cf730ff095e98104857dace482e07..db4ae3aa6f74352098034fc7acb6b1f80e228b36 100644 (file)
@@ -110,18 +110,10 @@ app.get('/', function(req, res) {
   res.render('index.ejs');
 });
 
-let currentArl = ''    //api auth required, this is usually stored in the Vue app
 app.post('/download/', function (req, res) {
        //simple api endpoint that accepts a deezer url, and adds it to download
-       //expecting {'url': 'https://www.deezer.com/playlist/xxxxxxxxxx', 'userToken': '<USER_TOKEN>' }
+       //expecting {"url": "https://www.deezer.com/playlist/xxxxxxxxxx" }
        //also accepts an array of deezer urls
-       if (currentArl == '') {
-               clientsocket.emit('loginViaUserToken', req.body.userToken)
-       }
-       else if (currentArl != req.body.userToken){
-               clientsocket.emit('logout')
-               clientsocket.emit('loginViaUserToken', req.body.userToken)
-       }
        if (Array.isArray(req.body.url)) {
                for (let x in req.body.url) {
                        clientaddToQueue(req.body.url[x])