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

Generate slugs for all users #73

Open
crysfel opened this issue Aug 22, 2019 · 5 comments
Open

Generate slugs for all users #73

crysfel opened this issue Aug 22, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@crysfel
Copy link
Member

crysfel commented Aug 22, 2019

We need to generate a slug for all users in the database (and all new users), we are going to use it to create links in the FE for their profile pages.

  • This task requires to update the user schema and add a new slug field, it should be unique and indexed in the database.
  • When a new user is created we need to generate a new slug for the new user
  • Update all user endpoints to find the user by slug or _id
  • Create a script to assign a slug to the current user in the database
@brentmclark
Copy link
Collaborator

@crysfel, how do you feel about only using the slug instead of maintaining both the slug and the _id?

@crysfel
Copy link
Member Author

crysfel commented Aug 30, 2019

I'm ok with that, the only thing is we will have to deploy the FE and BE at the same time. That's why I was thinking on supporting both fields, but I don't think this is a big issue.

@brentmclark
Copy link
Collaborator

ohhh, right. Great point. Then my idea is bad for the short term. How do you feel about moving to a "slug only" approach eventually? As in, after the FE is no longer using the _id?

@crysfel
Copy link
Member Author

crysfel commented Sep 3, 2019

Yes, totally. I think it will make our lives easier to maintain a single ID key

@moshfeu
Copy link
Member

moshfeu commented Mar 28, 2022

I believe that with nextjs so the server is not responsible on serving the FE, this task is no longer relevant.
If any, it's on the FE side but I'm not sure how important it is - we didn't get any request about it.

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

No branches or pull requests

3 participants