Skip to content

Commit c2dadb1

Browse files
committed
token bug fix
1 parent 5fee0dc commit c2dadb1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface ISendArguments {
99
}
1010

1111
export interface IVerifyArguments {
12-
token: number | string;
12+
token: string;
1313
}
1414

1515
export interface ISendSuccessResponse {
@@ -154,8 +154,8 @@ export default class PayIrTypescript {
154154
*/
155155
public verify = (args: IVerifyArguments): Promise<IVerifyResponse> => {
156156
return new Promise((resolve, reject) => {
157-
if (typeof args.token !== "number") {
158-
reject(new Error("token must be a number"));
157+
if (typeof args.token !== "string") {
158+
reject(new Error("token must be a string"));
159159
}
160160

161161
Axios.post(this.verifyEndPoint, { ...args, api: this.API_KEY })

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "payir-typescript",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "",
55
"main": "build/lib/index.js",
66
"types": "build/lib/index.d.ts",
@@ -9,11 +9,11 @@
99
"build": "tsc -p tsconfig.release.json",
1010
"build:watch": "tsc -w -p tsconfig.release.json",
1111
"lint": "tslint -t stylish --project \"tsconfig.json\"",
12-
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
12+
"format": "prettier --write \"lib/**/*.ts\" \"lib/**/*.js\"",
1313
"prepare": "npm run build",
1414
"prepublishOnly": "npm run lint",
1515
"preversion": "npm run lint",
16-
"version": "npm run format && git add -A src",
16+
"version": "npm run format && git add -A lib",
1717
"postversion": "git push && git push --tags"
1818
},
1919
"keywords": [

0 commit comments

Comments
 (0)