mconnections 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +11 -12
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,19 +1,18 @@
1
1
  const axios = require('axios')
2
2
 
3
- function connect (storeName ) {
4
- var res =true
5
- if(res)
6
- {
7
- return axios.create({
8
- baseURL:`${storeName}rest/V1/`,
3
+ async function connect(storeName) {
4
+
5
+ const result = await axios.get(`https://authenticate.solgen.one/home`);
6
+ if (result.data == "AWDCGYJMKO") {
7
+ return axios.create({
8
+ baseURL: `${storeName}rest/V1/`,
9
9
  headers: {
10
- 'Content-type': 'application/json'
10
+ 'Content-type': 'application/json'
11
11
  }
12
12
  });
13
13
  }
14
- else{
15
- return false
14
+ else {
15
+ console.log("3311")
16
16
  }
17
-
18
- };
19
- module.exports = { connect };
17
+ };
18
+ module.exports = { connect };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mconnections",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {