dymo-api 1.0.37 → 1.0.38
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.
- package/dist/branches/private.js +3 -3
- package/dist/branches/public.js +4 -4
- package/dist/dymo-api.js +0 -1
- package/dist/dymo-api.mjs +0 -1
- package/package.json +1 -1
package/dist/branches/private.js
CHANGED
|
@@ -50,7 +50,7 @@ const isValidData = async (token, data) => {
|
|
|
50
50
|
return response.data;
|
|
51
51
|
}
|
|
52
52
|
catch (error) {
|
|
53
|
-
throw customError(5000, error.message);
|
|
53
|
+
throw customError(5000, error.response?.data?.message || error.message);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
exports.isValidData = isValidData;
|
|
@@ -82,7 +82,7 @@ const sendEmail = async (token, data) => {
|
|
|
82
82
|
return response.data;
|
|
83
83
|
}
|
|
84
84
|
catch (error) {
|
|
85
|
-
throw customError(5000, error.message);
|
|
85
|
+
throw customError(5000, error.response?.data?.message || error.message);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
exports.sendEmail = sendEmail;
|
|
@@ -102,7 +102,7 @@ const getRandom = async (token, data) => {
|
|
|
102
102
|
return response.data;
|
|
103
103
|
}
|
|
104
104
|
catch (error) {
|
|
105
|
-
throw customError(5000, error.message);
|
|
105
|
+
throw customError(5000, error.response?.data?.message || error.message);
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
exports.getRandom = getRandom;
|
package/dist/branches/public.js
CHANGED
|
@@ -45,7 +45,7 @@ const getPrayerTimes = async (data) => {
|
|
|
45
45
|
return response.data;
|
|
46
46
|
}
|
|
47
47
|
catch (error) {
|
|
48
|
-
throw customError(5000, error.message);
|
|
48
|
+
throw customError(5000, error.response?.data?.message || error.message);
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
exports.getPrayerTimes = getPrayerTimes;
|
|
@@ -58,7 +58,7 @@ const satinizer = async (data) => {
|
|
|
58
58
|
return response.data;
|
|
59
59
|
}
|
|
60
60
|
catch (error) {
|
|
61
|
-
throw customError(5000, error.message);
|
|
61
|
+
throw customError(5000, error.response?.data?.message || error.message);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
exports.satinizer = satinizer;
|
|
@@ -94,7 +94,7 @@ const isValidPwd = async (data) => {
|
|
|
94
94
|
return response.data;
|
|
95
95
|
}
|
|
96
96
|
catch (error) {
|
|
97
|
-
throw customError(5000, error.message);
|
|
97
|
+
throw customError(5000, error.response?.data?.message || error.message);
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
exports.isValidPwd = isValidPwd;
|
|
@@ -107,7 +107,7 @@ const newURLEncrypt = async (data) => {
|
|
|
107
107
|
return response.data;
|
|
108
108
|
}
|
|
109
109
|
catch (error) {
|
|
110
|
-
throw customError(5000, error.message);
|
|
110
|
+
throw customError(5000, error.response?.data?.message || error.message);
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
exports.newURLEncrypt = newURLEncrypt;
|
package/dist/dymo-api.js
CHANGED
|
@@ -99,7 +99,6 @@ class DymoAPI {
|
|
|
99
99
|
return await PrivateAPI.isValidData(this.rootApiKey || this.apiKey, data);
|
|
100
100
|
}
|
|
101
101
|
async sendEmail(data) {
|
|
102
|
-
console.log(this.serverEmailConfig, this.rootApiKey);
|
|
103
102
|
if (!this.serverEmailConfig && !this.rootApiKey)
|
|
104
103
|
throw customError(5000, "You must configure the email client settings.");
|
|
105
104
|
return await PrivateAPI.sendEmail(this.rootApiKey || this.apiKey, { serverEmailConfig: this.serverEmailConfig, ...data });
|
package/dist/dymo-api.mjs
CHANGED
|
@@ -99,7 +99,6 @@ class DymoAPI {
|
|
|
99
99
|
return await PrivateAPI.isValidData(this.rootApiKey || this.apiKey, data);
|
|
100
100
|
}
|
|
101
101
|
async sendEmail(data) {
|
|
102
|
-
console.log(this.serverEmailConfig, this.rootApiKey);
|
|
103
102
|
if (!this.serverEmailConfig && !this.rootApiKey)
|
|
104
103
|
throw customError(5000, "You must configure the email client settings.");
|
|
105
104
|
return await PrivateAPI.sendEmail(this.rootApiKey || this.apiKey, { serverEmailConfig: this.serverEmailConfig, ...data });
|