Skip to content

Commit

Permalink
fix: updated usage of shapestream requiring 'params' field
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Feb 5, 2025
1 parent 00df95e commit a63b85d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 8 additions & 4 deletions src/mapper/src/store/entities.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ function getEntityStatusStream(projectId: number): ShapeStream | undefined {
}
return new ShapeStream({
url: `${import.meta.env.VITE_SYNC_URL}/v1/shape`,
table: 'odk_entities',
where: `project_id=${projectId}`,
params: {
table: 'odk_entities',
where: `project_id=${projectId}`,
},
});
}

Expand All @@ -71,8 +73,10 @@ function getNewBadGeomStream(projectId: number): ShapeStream | undefined {
}
return new ShapeStream({
url: `${import.meta.env.VITE_SYNC_URL}/v1/shape`,
table: 'geometrylog',
where: `project_id=${projectId}`,
params: {
table: 'geometrylog',
where: `project_id=${projectId}`,
},
});
}

Expand Down
6 changes: 4 additions & 2 deletions src/mapper/src/store/tasks.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ function getTaskEventStream(projectId: number): ShapeStream | undefined {
}
return new ShapeStream({
url: `${import.meta.env.VITE_SYNC_URL}/v1/shape`,
table: 'task_events',
where: `project_id=${projectId}`,
params: {
table: 'task_events',
where: `project_id=${projectId}`,
},
});
}

Expand Down

0 comments on commit a63b85d

Please sign in to comment.