Check if logged out for POST and DELETE requests

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2018-06-02 12:24:57 -04:00
parent 13382ed86e
commit 966bebd32c
+2
View File
@@ -132,6 +132,7 @@ export const api = {
headers: new Headers({ "Content-Type": "application/json" }),
credentials: this.credentialType()
})
.then(api.checkIfLoggedOut)
.then(api.convertJSON)
.then(api.checkForErrors);
},
@@ -140,6 +141,7 @@ export const api = {
method: "DELETE",
credentials: this.credentialType()
})
.then(api.checkIfLoggedOut)
.then(api.convertJSON)
.then(api.checkForErrors);
},