comty.js 0.68.0 → 0.68.1
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/models/auth/index.js +7 -6
- package/package.json +26 -26
|
@@ -64,20 +64,22 @@ var _session = require('../session'); var _session2 = _interopRequireDefault(_se
|
|
|
64
64
|
* @param {string} payload.password - The password of the user.
|
|
65
65
|
* @param {string} payload.email - The email of the user.
|
|
66
66
|
* @param {boolean} payload.tos - The acceptance of the terms of service.
|
|
67
|
+
* @param {string} payload.captcha - The captcha token.
|
|
67
68
|
* @return {Promise<Object>} A Promise that resolves with the response data if the registration is successful, or false if there was an error.
|
|
68
69
|
* @throws {Error} Throws an error if the registration fails.
|
|
69
70
|
*/
|
|
70
71
|
static async register(payload) {
|
|
71
|
-
const { username, password, email, tos } = payload
|
|
72
|
+
const { username, password, email, tos, captcha } = payload
|
|
72
73
|
|
|
73
74
|
const response = await _request2.default.call(void 0, {
|
|
74
75
|
method: "post",
|
|
75
76
|
url: "/register",
|
|
76
77
|
data: {
|
|
77
|
-
username,
|
|
78
|
-
password,
|
|
79
|
-
email,
|
|
78
|
+
username: username,
|
|
79
|
+
password: password,
|
|
80
|
+
email: email,
|
|
80
81
|
accept_tos: tos,
|
|
82
|
+
captcha: captcha,
|
|
81
83
|
},
|
|
82
84
|
}).catch((error) => {
|
|
83
85
|
console.error(error)
|
|
@@ -176,8 +178,7 @@ var _session = require('../session'); var _session2 = _interopRequireDefault(_se
|
|
|
176
178
|
* @return {Promise<Object>} The data response after changing the password.
|
|
177
179
|
*/
|
|
178
180
|
static async changePassword(payload) {
|
|
179
|
-
const { currentPassword, newPassword, code, verificationToken } =
|
|
180
|
-
payload
|
|
181
|
+
const { currentPassword, newPassword, code, verificationToken } = payload
|
|
181
182
|
|
|
182
183
|
const { data } = await _request2.default.call(void 0, {
|
|
183
184
|
method: "put",
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
"name": "comty.js",
|
|
3
|
+
"version": "0.68.1",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"description": "Official Comty API for JavaScript",
|
|
6
|
+
"homepage": "https://github.com/ragestudio/comty.js",
|
|
7
|
+
"author": "RageStudio <support@ragestudio.net>",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "hermes build"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@foxify/events": "^2.1.0",
|
|
17
|
+
"axios": "^1.8.4",
|
|
18
|
+
"js-cookie": "^3.0.5",
|
|
19
|
+
"jsonwebtoken": "^9.0.0",
|
|
20
|
+
"jwt-decode": "^4.0.0",
|
|
21
|
+
"linebridge-client": "^1.1.1",
|
|
22
|
+
"luxon": "^3.6.0",
|
|
23
|
+
"socket.io-client": "^4.8.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@ragestudio/hermes": "^1.0.1"
|
|
27
|
+
}
|
|
28
28
|
}
|