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

Having ids in endpoint urls #25

Open
emrdagkusu opened this issue Jan 10, 2022 · 1 comment
Open

Having ids in endpoint urls #25

emrdagkusu opened this issue Jan 10, 2022 · 1 comment
Assignees

Comments

@emrdagkusu
Copy link
Collaborator

I just realized that we are keeping ids in endpoint URLs and that makes it longer. For example, for creating a lesson we are using this endpoint URL:

users/{uid}/semesters/{sid}/lessons

However, we can do that with just
1)

/lessons

Or if we want to keep the information that this new lesson will be related to users and semesters, we can do like:
2)

/users/semesters/lessons

I think we should remove ids inside the endpoint URLs, but I am not sure which option to choose. 1 or 2?

@hbusul
Copy link
Owner

hbusul commented Mar 12, 2022

So how about this, I know we discussed this before but

I vote for adding new endpoints:

  • /semesters/* when you call it, it does whatever it does for the authenticated user's semesters
  • /lessons/* when you call it, it assumes authenticated user and the current semester

Maybe we just do an internal forwarding to the existing endpoints and this way, if and admin wants to do stg, he/she can do with the long endpoint but the normal user is not bothered with writing that long url everytime.

@emrdagkusu emrdagkusu self-assigned this Mar 17, 2022
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

No branches or pull requests

2 participants