Skip to content

Commit

Permalink
fix primary key encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
ssanjay1 committed Jul 25, 2024
1 parent 6387a92 commit 11d1af0
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function getAllTimeSeriesPoints<T extends string | number>(
createOpenApiRequest(client.stack, client.fetch, undefined, true),
client.ontology.metadata.ontologyApiName,
apiName,
primaryKey,
encodeURIComponent(primaryKey),
propertyName,
body,
);
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy-client/src/client/net/getFirstPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export async function getFirstPoint<T extends string | number>(
createOpenApiRequest(client.stack, client.fetch),
client.ontology.metadata.ontologyApiName,
objectApiName,
primaryKey,
encodeURIComponent(primaryKey),
propertyName,
);
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy-client/src/client/net/getLastPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export async function getLastPoint<T extends string | number>(
createOpenApiRequest(client.stack, client.fetch),
client.ontology.metadata.ontologyApiName,
objectApiName,
primaryKey,
encodeURIComponent(primaryKey),
propertyName,
);
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy-client/src/client/net/getLinkedObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export async function getLinkedObjectNoErrors<T extends OntologyObject>(
createOpenApiRequest(client.stack, client.fetch),
client.ontology.metadata.ontologyApiName,
sourceApiName,
primaryKey,
encodeURIComponent(primaryKey),
linkTypeApiName,
linkedObjectPrimaryKey,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function getLinkedObjectsPage<T extends OntologyObject>(
createOpenApiRequest(client.stack, client.fetch),
client.ontology.metadata.ontologyApiName,
sourceApiName,
primaryKey,
encodeURIComponent(primaryKey),
linkTypeApiName,
{
pageSize: options?.pageSize,
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy-client/src/client/net/getObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export async function getObjectWithoutErrors<T extends OntologyObject>(
createOpenApiRequest(client.stack, client.fetch),
client.ontology.metadata.ontologyApiName,
objectApiName,
primaryKey.toString(),
encodeURIComponent(primaryKey.toString()),
{
select: selectedProperties.map(x => x.toString()),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function* iterateTimeSeriesPoints<T extends string | number>(
createOpenApiRequest(client.stack, client.fetch, undefined, true),
client.ontology.metadata.ontologyApiName,
apiName,
primaryKey,
encodeURIComponent(primaryKey),
propertyName,
body,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function* iterateLinkedObjects<T extends OntologyObject>(
createOpenApiRequest(client.stack, client.fetch),
client.ontology.metadata.ontologyApiName,
sourceApiName,
primaryKey,
encodeURIComponent(primaryKey),
linkTypeApiName,
{
pageSize: options?.pageSize,
Expand Down

0 comments on commit 11d1af0

Please sign in to comment.