Open crysfel opened 5 years ago
@crysfel, how do you feel about only using the slug
instead of maintaining both the slug
and the _id
?
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.
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
?
Yes, totally. I think it will make our lives easier to maintain a single ID key
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.
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.
slug
field, it should be unique and indexed in the database.slug
or_id