Skip to content

Commit b0daa78

Browse files
authored
Merge pull request #25 from Juuuub/main
2 parents 3b8925a + f03b0a2 commit b0daa78

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "paystack-sdk",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "Paystack SDK written in Typescript",
55
"main": "dist/index.js",
66
"author": "Tech Priest",

src/paystack.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AxiosInstance } from 'axios';
1+
import { AxiosInstance, AxiosResponse } from 'axios';
22
import { ApplePay } from './apple/apple';
33
import { Charge } from './charge/charge';
44
import { Customer } from './customer/customer';
@@ -54,9 +54,7 @@ export class Paystack {
5454
'Content-Type': 'application/json',
5555
},
5656
});
57-
this.http.interceptors.response.use(
58-
(response) => (response.data = JSON.parse(response.data)),
59-
);
57+
this.http.interceptors.response.use((response: AxiosResponse) => response.data);
6058

6159
this.bulkcharge = new BulkCharge(this.http);
6260
this.charge = new Charge(this.http);

0 commit comments

Comments
 (0)