Skip to content

Commit

Permalink
feat: Make payload optional (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
krish221997 authored Oct 28, 2024
1 parent 4251c70 commit 447ba3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/connections/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@integrationos/authkit-node",
"version": "1.2.0",
"version": "1.2.2",
"description": "Secure token generation for IntegrationOS AuthKit",
"main": "dist/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/connections/src/apis/link.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const generateId = async (prefix: string) => {
export const createEventLinkTokenApi = async (
headers: Record<string, string>,
url: string,
payload: CreateEventLinkPayload,
secret: string
secret: string,
payload?: CreateEventLinkPayload,
) => {
try {
const settings = await axios.post<LinkSettings>(
Expand Down
4 changes: 2 additions & 2 deletions packages/connections/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class AuthKitToken {
return 'https://api.integrationos.com/internal';
}

async create(payload: {
async create(payload?: {
ttl?: number;
/**
* Unique identifier for the token.
Expand All @@ -49,7 +49,7 @@ export class AuthKitToken {
const url = this._url;
const headers = getHeaders(secret);

const result = await createEventLinkTokenApi(headers, url, payload, secret);
const result = await createEventLinkTokenApi(headers, url, secret, payload);
return result;
}
}

0 comments on commit 447ba3d

Please sign in to comment.