rts2003-so 1.4.1 → 1.4.3

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 (3) hide show
  1. package/README.md +3 -6
  2. package/index.js +12 -11
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -61,12 +61,9 @@ const result = sso.userDelete({
61
61
  });
62
62
 
63
63
  // user get user for api
64
- const result = sso.getOne({
65
- "email": "string"
66
- });
67
-
68
- const result = sso.getOne({
69
- "id": "string"
64
+ const result = sso.userGetOne({
65
+ "email": "string",
66
+ "id": 0
70
67
  });
71
68
 
72
69
  // user update password for api
package/index.js CHANGED
@@ -31,16 +31,16 @@ class SingleSignOn {
31
31
  if (!dataToSend.email) {
32
32
  return { message: "Field email not found", statusCode: 400, error: false };
33
33
  }
34
- if (!secret_key.first_name) {
34
+ if (!dataToSend.first_name) {
35
35
  return { message: "Field first_name not found", statusCode: 400, error: false };
36
36
  }
37
- if (!secret_key.last_name) {
37
+ if (!dataToSend.last_name) {
38
38
  return { message: "Field last_name not found", statusCode: 400, error: false };
39
39
  }
40
- if (!secret_key.is_active) {
40
+ if (!dataToSend.is_active) {
41
41
  return { message: "Field is_active not found", statusCode: 400, error: false };
42
42
  }
43
- if (!secret_key.created_by) {
43
+ if (!dataToSend.created_by) {
44
44
  return { message: "Field created_by not found", statusCode: 400, error: false };
45
45
  }
46
46
 
@@ -77,16 +77,16 @@ class SingleSignOn {
77
77
  if (!dataToSend.id) {
78
78
  return { message: "Field id not found", statusCode: 400, error: false };
79
79
  }
80
- if (!secret_key.first_name) {
80
+ if (!dataToSend.first_name) {
81
81
  return { message: "Field first_name not found", statusCode: 400, error: false };
82
82
  }
83
- if (!secret_key.last_name) {
83
+ if (!dataToSend.last_name) {
84
84
  return { message: "Field last_name not found", statusCode: 400, error: false };
85
85
  }
86
- if (!secret_key.is_active) {
86
+ if (!dataToSend.is_active) {
87
87
  return { message: "Field is_active not found", statusCode: 400, error: false };
88
88
  }
89
- if (!secret_key.updated_by) {
89
+ if (!dataToSend.updated_by) {
90
90
  return { message: "Field updated_by not found", statusCode: 400, error: false };
91
91
  }
92
92
 
@@ -120,7 +120,7 @@ class SingleSignOn {
120
120
  if (!dataToSend.id) {
121
121
  return { message: "Field id not found", statusCode: 400, error: false };
122
122
  }
123
- if (!secret_key.deleted_by) {
123
+ if (!dataToSend.deleted_by) {
124
124
  return { message: "Field deleted_by not found", statusCode: 400, error: false };
125
125
  }
126
126
 
@@ -140,8 +140,9 @@ class SingleSignOn {
140
140
  }
141
141
  }
142
142
 
143
- async getOne(dataToSend = {
144
- email
143
+ async userGetOne(dataToSend = {
144
+ email,
145
+ id
145
146
  }) {
146
147
  try {
147
148
  if (!this.endpoint) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rts2003-so",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "RTS2003 SO is service order, manage user, like re-token, logout, register, update, delete, update password, get user.",
5
5
  "main": "index.js",
6
6
  "scripts": {