Skip to content

Commit

Permalink
fix: SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed Jul 8, 2024
1 parent 5b068a4 commit 2081ca3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/sdk/javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrite/sdk",
"version": "0.4.9",
"version": "0.4.10",
"private": false,
"description": "JavaScript SDK and API client for Vrite - open-source developer content platform",
"license": "MIT",
Expand Down
10 changes: 6 additions & 4 deletions packages/sdk/javascript/src/api/content-pieces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ interface ContentPiecesEndpoints {
>(
input: PaginationParams & {
content?: IncludeContent;
contentGroupId: string | string[];
contentGroupId?: string | string[];
tagId?: string;
slug?: string;
variant?: string;
Expand Down Expand Up @@ -205,7 +205,7 @@ const createContentPiecesEndpoints = (sendRequest: SendRequest): ContentPiecesEn
...input
}: PaginationParams & {
content?: IncludeContent;
contentGroupId: string | string[];
contentGroupId?: string | string[];
tagId?: string;
slug?: string;
variant?: string;
Expand All @@ -216,8 +216,10 @@ const createContentPiecesEndpoints = (sendRequest: SendRequest): ContentPiecesEn
{
params: {
...input,
contentGroupId:
typeof contentGroupId === "string" ? contentGroupId : contentGroupId.join(",")
...(contentGroupId && {
contentGroupId:
typeof contentGroupId === "string" ? contentGroupId : contentGroupId.join(",")
})
}
}
);
Expand Down

0 comments on commit 2081ca3

Please sign in to comment.