From 720337b4401a2b1696c91e5f1cee7ba6ec7ec72b Mon Sep 17 00:00:00 2001 From: Zxilly Date: Wed, 28 Apr 2021 14:21:07 +0800 Subject: [PATCH] revert: Revert "fix: won't reparse the response (#59)" (#60) This reverts commit 9b2e3d052a123fad0429a5edf09a57e641f34900. Signed-off-by: Zxilly --- src/Authorizer.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Authorizer.ts b/src/Authorizer.ts index e12dc17f..6bdad146 100644 --- a/src/Authorizer.ts +++ b/src/Authorizer.ts @@ -83,7 +83,7 @@ export class Authorizer { } this.permission.load(permission); } - + public async initEnforcer(s: string): Promise { const obj = JSON.parse(s); if (!('m' in obj)) { @@ -107,7 +107,6 @@ export class Authorizer { } const resp = await axios.get(`${this.endpoint}?subject=${this.user}`, { headers: this.requestHeaders, - transformResponse: res => res, }); return resp.data.data; }