@stackfactor/client-api 1.1.86 → 1.1.87
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/lib/users.js +9 -5
- package/package.json +1 -1
package/lib/users.js
CHANGED
|
@@ -389,13 +389,17 @@ const login = (email, password) => {
|
|
|
389
389
|
|
|
390
390
|
/**
|
|
391
391
|
* Logout from the server. It returns a promise
|
|
392
|
-
* @param {String}
|
|
392
|
+
* @param {String} token Authorization token
|
|
393
393
|
*/
|
|
394
|
-
const logout = (
|
|
394
|
+
const logout = (token) => {
|
|
395
395
|
return new Promise(function (resolve, reject) {
|
|
396
|
-
let request = client.post(
|
|
397
|
-
|
|
398
|
-
|
|
396
|
+
let request = client.post(
|
|
397
|
+
"api/v1/auth/logout",
|
|
398
|
+
{},
|
|
399
|
+
{
|
|
400
|
+
headers: { authorization: token },
|
|
401
|
+
}
|
|
402
|
+
);
|
|
399
403
|
request
|
|
400
404
|
.then((response) => {
|
|
401
405
|
resolve(response.data);
|