@in.pulse-crm/sdk 1.5.0 → 1.5.2
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/auth.js +2 -2
- package/package.json +1 -1
- package/src/auth.ts +2 -2
package/dist/auth.js
CHANGED
|
@@ -21,7 +21,7 @@ class AuthSDK {
|
|
|
21
21
|
* @returns {Promise<DataResponse<LoginData>>} Dados de login.
|
|
22
22
|
*/
|
|
23
23
|
async login(instance, username, password) {
|
|
24
|
-
const response = await this.httpClient.post(`/login`, { LOGIN: username, SENHA: password, instance });
|
|
24
|
+
const response = await this.httpClient.post(`/auth/login`, { LOGIN: username, SENHA: password, instance });
|
|
25
25
|
return response.data;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
@@ -31,7 +31,7 @@ class AuthSDK {
|
|
|
31
31
|
*/
|
|
32
32
|
async fetchSessionData(authToken) {
|
|
33
33
|
const response = await this.httpClient
|
|
34
|
-
.get(`/auth`, {
|
|
34
|
+
.get(`/auth/session`, {
|
|
35
35
|
headers: {
|
|
36
36
|
authorization: authToken,
|
|
37
37
|
},
|
package/package.json
CHANGED
package/src/auth.ts
CHANGED
|
@@ -55,7 +55,7 @@ export default class AuthSDK {
|
|
|
55
55
|
*/
|
|
56
56
|
public async login(instance: string, username: string, password: string): Promise<DataResponse<LoginData>> {
|
|
57
57
|
const response = await this.httpClient.post<DataResponse<LoginData>>(
|
|
58
|
-
`/login`,
|
|
58
|
+
`/auth/login`,
|
|
59
59
|
{ LOGIN: username, SENHA: password, instance },
|
|
60
60
|
);
|
|
61
61
|
|
|
@@ -69,7 +69,7 @@ export default class AuthSDK {
|
|
|
69
69
|
*/
|
|
70
70
|
public async fetchSessionData(authToken: string): Promise<DataResponse<SessionData>> {
|
|
71
71
|
const response = await this.httpClient
|
|
72
|
-
.get<DataResponse<SessionData>>(`/auth`, {
|
|
72
|
+
.get<DataResponse<SessionData>>(`/auth/session`, {
|
|
73
73
|
headers: {
|
|
74
74
|
authorization: authToken,
|
|
75
75
|
},
|