From 966bebd32c8749bfa5505a09c1863fda660bd4d3 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 2 Jun 2018 12:06:12 -0400 Subject: [PATCH] Check if logged out for POST and DELETE requests Signed-off-by: Mcat12 --- src/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils.js b/src/utils.js index 03b1678..7ef0219 100644 --- a/src/utils.js +++ b/src/utils.js @@ -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); },