Skip to content

Commit 9b2e3d0

Browse files
authored
fix: won't reparse the response (#59)
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
1 parent ca5343c commit 9b2e3d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Authorizer.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class Authorizer {
8383
}
8484
this.permission.load(permission);
8585
}
86-
86+
8787
public async initEnforcer(s: string): Promise<void> {
8888
const obj = JSON.parse(s);
8989
if (!('m' in obj)) {
@@ -107,6 +107,7 @@ export class Authorizer {
107107
}
108108
const resp = await axios.get<BaseResponse>(`${this.endpoint}?subject=${this.user}`, {
109109
headers: this.requestHeaders,
110+
transformResponse: res => res,
110111
});
111112
return resp.data.data;
112113
}

0 commit comments

Comments
 (0)