From 600ee1c8f70aa1666ef5fde90cbbd609cd798c8f Mon Sep 17 00:00:00 2001
From: Michael Fatemi <myfatemi04@gmail.com>
Date: Sat, 10 Apr 2021 23:20:14 -0400
Subject: [PATCH] fix session_id

---
 src/api/utils.ts | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/api/utils.ts b/src/api/utils.ts
index 7c6f25d..894828e 100644
--- a/src/api/utils.ts
+++ b/src/api/utils.ts
@@ -35,7 +35,7 @@ export function graphql(query: string, variables?: any) {
 			})
 			.catch((error) => {
 				if (error.response.status === 401) {
-					localStorage.removeItem('session_id');
+					localStorage.removeItem('session_token');
 					window.location.pathname = '/';
 				} else {
 					reject(new APIError('/api/users/@me', error.response.data.error));
@@ -53,7 +53,7 @@ export function makeAPIPostCall(url: string, data?: any) {
 			.then((successfulResponse) => resolve(successfulResponse))
 			.catch((error) => {
 				if (error.response?.status === 401) {
-					localStorage.removeItem('session_id');
+					localStorage.removeItem('session_token');
 					window.location.pathname = '/';
 				} else {
 					reject(new APIError(url, error.response?.data?.error));
@@ -75,7 +75,7 @@ export function makeAPIGetCall(
 			.then((successfulResponse) => resolve(successfulResponse))
 			.catch((error) => {
 				if (error.response?.status === 401) {
-					localStorage.removeItem('session_id');
+					localStorage.removeItem('session_token');
 					window.location.pathname = '/';
 				} else {
 					reject(error);
@@ -93,7 +93,7 @@ export function makeAPIDeleteCall(url: string) {
 			.then((successfulResponse) => resolve(successfulResponse))
 			.catch((error) => {
 				if (error.response?.status === 401) {
-					localStorage.removeItem('session_id');
+					localStorage.removeItem('session_token');
 				} else {
 					reject(new APIError(url, error.response.data.error));
 				}