Lee Morgan 6 gadi atpakaļ
vecāks
revīzija
17deb83909
1 mainītis faili ar 1 papildinājumiem un 3 dzēšanām
  1. 1 3
      controllers/otherData.js

+ 1 - 3
controllers/otherData.js

@@ -218,10 +218,8 @@ module.exports = {
 
     cloverAuth: function(req, res){
         let authorizationCode = req.url.slice(req.url.indexOf("code=") + 5);
-        req.session.merchantId = req.url.slice(req.url.indexOf("merchant_id=") + 12, req.url.indexOf("&client_id"))
+        req.session.merchantId = req.url.slice(req.url.indexOf("merchant_id=") + 12, req.url.indexOf("&"))
         
-        console.log("I have run");
-
         axios.get(`${process.env.CLOVER_ADDRESS}/oauth/token?client_id=${process.env.SUBLINE_CLOVER_APPID}&client_secret=${process.env.SUBLINE_CLOVER_APPSECRET}&code=${authorizationCode}`)
             .then((response)=>{
                 req.session.accessToken = response.data.access_token;