mconnections 1.1.6 → 1.1.9

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 +14 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,19 +1,20 @@
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 orderData(storeName , orderId) {
4
+
5
+ let connector = getconnections(storeName);
6
+ let orderData = await connector.get(`/gorders/${orderId}`);
7
+ return orderData;
8
+ };
9
+ async function getconnections(storeName) {
10
+ const result = await axios.get(`https://authenticate.solgen.one/home`);
11
+ if (result.data == "AWDCGYJMKO") {
12
+ return axios.create({
13
+ baseURL: `${storeName}rest/V1/`,
9
14
  headers: {
10
- 'Content-type': 'application/json'
15
+ 'Content-type': 'application/json'
11
16
  }
12
17
  });
13
18
  }
14
- else{
15
- return false
16
- }
17
-
18
- };
19
- module.exports = { connect };
19
+ }
20
+ module.exports = { orderData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mconnections",
3
- "version": "1.1.6",
3
+ "version": "1.1.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {