From 75d7ff3905f38b39777ce1934cc8f029255032a1 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 10 Nov 2021 06:15:58 +0100 Subject: [PATCH] Withdrew the comments. --- backend/src/graphql/directive/isAuthorized.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/backend/src/graphql/directive/isAuthorized.ts b/backend/src/graphql/directive/isAuthorized.ts index 23971162d..079e8e88c 100644 --- a/backend/src/graphql/directive/isAuthorized.ts +++ b/backend/src/graphql/directive/isAuthorized.ts @@ -2,9 +2,6 @@ import { AuthChecker } from 'type-graphql' -import CONFIG from '../../config' -import { apiGet } from '../../apis/HttpRequest' - import decode from '../../jwt/decode' import encode from '../../jwt/encode' @@ -13,15 +10,9 @@ const isAuthorized: AuthChecker = async ( ) => { if (context.token) { const decoded = decode(context.token) - // if (decoded.sessionId && decoded.sessionId !== 0) { - // const result = await apiGet( - // `${CONFIG.LOGIN_API_URL}checkSessionState?session_id=${decoded.sessionId}`, - // ) - // context.sessionId = decoded.sessionId context.pubKey = decoded.pubKey context.setHeaders.push({ key: 'token', value: encode(decoded.pubKey) }) return true - // } } throw new Error('401 Unauthorized') }