Skip to content

Commit

Permalink
fix: won't reparse the response (#59)
Browse files Browse the repository at this point in the history
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
  • Loading branch information
Zxilly authored Apr 26, 2021
1 parent ca5343c commit 9b2e3d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Authorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class Authorizer {
}
this.permission.load(permission);
}

public async initEnforcer(s: string): Promise<void> {
const obj = JSON.parse(s);
if (!('m' in obj)) {
Expand All @@ -107,6 +107,7 @@ export class Authorizer {
}
const resp = await axios.get<BaseResponse>(`${this.endpoint}?subject=${this.user}`, {
headers: this.requestHeaders,
transformResponse: res => res,
});
return resp.data.data;
}
Expand Down

0 comments on commit 9b2e3d0

Please # to comment.