Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added session id filter for capture and raw capture #276

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

maxt0214
Copy link
Contributor

No description provided.

@maxt0214
Copy link
Contributor Author

maxt0214 commented Jan 27, 2023

@nmcharlton I have added session id filter for both captures and raw captures. These changes are not yet tested. I'll test those and add unit tests as the next step

@@ -71,7 +71,8 @@ router.get(
query,
Joi.object().keys({
grower_account_id: Joi.string().uuid(),
organization_id: Joi.array(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a deliberate change? organization_id should be an array to allow us to query multiple sub-organizations in one go.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a mistake that I made when I add session_id field. I have pushed a fix for it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxt0214 We're starting to add more detail to the validation. Can you please update to this ...
organization_id: Joi.array().items(Joi.string().uuid()), session_id: Joi.string().uuid(),

... and confirm your code is up-to-date, then resubmit for review. Thanks!

@maxt0214 maxt0214 marked this pull request as draft February 14, 2023 17:38
@maxt0214
Copy link
Contributor Author

maxt0214 commented Feb 14, 2023

I followed the instruction in the readme to set up DB connection by essentially running:

cross-env DATABASE_URL=[url] NODE_PATH=server/ ts-node -r dotenv/config --project tsconfig.build.json server/server.ts
url posted in the admin-panel slack channel: https://app.slack.com/client/T6WR1QS8J/C8W6GT9MZ/thread/C8W6GT9MZ-1664751946.588069

When I direct frontend calls to my local server, it throws connection error with the database. Perhaps I have set up the db connection wrongly. What shall I do to fix this issue?

The following is the connection error:
218816646-7c6eb7b9-262d-40a1-9946-f9cda26fcfaf

@dadiorchen
Copy link
Contributor

@maxt0214 seems your database url env var doesn't work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants