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

use username instead of _id on watcher_change activity #33

Open
MarconLP opened this issue Apr 19, 2023 · 6 comments
Open

use username instead of _id on watcher_change activity #33

MarconLP opened this issue Apr 19, 2023 · 6 comments
Labels
good first issue Good for newcomers

Comments

@MarconLP
Copy link
Member

MarconLP commented Apr 19, 2023

image

https://app.tablane.net/1073/Tablane/Tasks/64163e0c616c000697788a58

@MarconLP MarconLP added the good first issue Good for newcomers label Apr 19, 2023
@willdelorm
Copy link

Hey @MarconLP, I'd be happy to take a look at this.

@MarconLP MarconLP assigned MarconLP and willdelorm and unassigned MarconLP Apr 19, 2023
@MarconLP
Copy link
Member Author

@willdelorm Awesome! Let me know if you have any questions.

@willdelorm
Copy link

Hey @MarconLP, excuse my delay. I'm sitting down to look at this, would you be able to help with setting up my .env files? I'm not sure where to get the necessary details.

@MarconLP
Copy link
Member Author

MarconLP commented May 5, 2023

Hey @willdelorm, I can walk you through the .env setup.

For the frontend:

  1. You need to copy the .env.example to .env.
  2. create an account on pusher.com and create a "channels app"
  3. navigate to the app keys panel in the side pane and copy the variables

These should look like this

REACT_APP_PUSHER_HOST=ws-eu.pusher.com
REACT_APP_PUSHER_KEY=51ae6966a7cf602251a2
REACT_APP_PUSHER_CLUSTER=eu

You can ignore the sign in with google variables, as those are only required for the sign-in with google button.
You can also ignore the posthog token and sentry endpoint variables as those are only for bug reporting and analytics

For the backend:
you can ignore the sign in with google variables

The DB_CONNECT variable should contain a MONGODB DATABASE URL. If you have mongodb installed locally without authorization the default mongodb://localhost:27017/tablane will work.

Otherwise you can use Railway, to provision a mongodb database.

In the pusher section you have to use the same variables as for the frontend and they should look like this:

PUSHER_HOST=api-eu.pusher.com
PUSHER_APP=1595440
PUSHER_KEY=51ae6966a7cf602251a2
PUSHER_SECRET=dccc63fee0370999191a

Make sure to start the frontend on port 3000 and the backend on port 3001

@willdelorm
Copy link

Again, my scattered brain delays me. I've got your app up and running. What I'm seeing is that the activity object's referencedUser could be used to search for a user's id on the database and pull their username. I can create a function in Activity.js that queries the db and sets a username variable to be used there. What do you think?

@MarconLP
Copy link
Member Author

Again, my scattered brain delays me. I've got your app up and running. What I'm seeing is that the activity object's referencedUser could be used to search for a user's id on the database and pull their username. I can create a function in Activity.js that queries the db and sets a username variable to be used there. What do you think?

Mongoose populate is what you are searching for.
It's similar to what has been done on the activity's author (user)

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

No branches or pull requests

2 participants