소스 검색

Fix small bug

Lee Morgan 6 년 전
부모
커밋
17deb83909
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  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;