From 24ec186c0556ed89ef4c1888f01995e7257fac51 Mon Sep 17 00:00:00 2001 From: Jeeiii Date: Tue, 9 Apr 2024 17:38:45 +0200 Subject: [PATCH] fix: minor issues on api sdk --- libs/api-sdk/src/groups.ts | 2 +- libs/api-sdk/src/invites.ts | 4 +++- libs/api-sdk/src/types/index.ts | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/api-sdk/src/groups.ts b/libs/api-sdk/src/groups.ts index 06783662..598256f6 100644 --- a/libs/api-sdk/src/groups.ts +++ b/libs/api-sdk/src/groups.ts @@ -107,7 +107,7 @@ export async function updateGroup( const requestUrl = `${url}/${groupId}` const newConfig: any = { - method: "put", + method: "patch", data: groupUpdateDetails, ...config } diff --git a/libs/api-sdk/src/invites.ts b/libs/api-sdk/src/invites.ts index 3de7da1d..df4af2b7 100644 --- a/libs/api-sdk/src/invites.ts +++ b/libs/api-sdk/src/invites.ts @@ -34,7 +34,9 @@ export async function createInvite( ): Promise { const newConfig: any = { method: "post", - data: groupId, + data: { + groupId + }, ...config } diff --git a/libs/api-sdk/src/types/index.ts b/libs/api-sdk/src/types/index.ts index 6f4d00ad..050e6ce7 100644 --- a/libs/api-sdk/src/types/index.ts +++ b/libs/api-sdk/src/types/index.ts @@ -25,9 +25,9 @@ export type GroupCreationDetails = { } export type GroupUpdateDetails = { - description: string - treeDepth: number - fingerprintDuration: number + description?: string + treeDepth?: number + fingerprintDuration?: number credentials?: Credential }