question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should API routes be revolving around chapters

See original GitHub issue

@timmyichen, @Zeko369, @nik-john, @allella I was looking at the api routes and I realized that the routes are revolving around chapters. What if an organization doesn’t have a chapter? Just, for example, assume we have Coders.org as an organization and they don’t want any chapters under them, they host events under the organization’s name. In that case, our routes will return 404, right? I think we should include /events, /events/eventId and so on as routes. What do you all think?

_Originally posted by @vkWeb in https://github.com/freeCodeCamp/chapter/pull/162#issuecomment-554988089_

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
allellacommented, Nov 18, 2019

This is a good question, though I would agree with still making everything run through the Chapter-based schema, even if there’s only 1 chapter in an organization.

I feel it’s easier to hide or tweak things in the UI, for example hiding the “Chapters” menu link if there’s only 1 Chapter, then it is to have a secondary pattern / API to support single-Chapter organizations.

0reactions
vkWebcommented, Nov 18, 2019

@allella Yes, that would be better instead of tweaking the whole API structure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Best Practices for Designing a Pragmatic RESTful API
Many of the API design opinions found on the web are academic discussions revolving around subjective interpretations of fuzzy standards as ...
Read more >
REST API Tutorial - API Route - YouTube
https://www.turbo360.co/tutorialshttps://www.turbo360.co/tutorial/creating-a-rest-apiIn this video, we connect the API route such that it ...
Read more >
RESTful API Design Patterns and Best Practices | Kong Inc.
An API designed according to the principles of REST can be built on any platform. These days, RESTful design revolves around four major...
Read more >
Chapter 9. REST API design and layered service architectures
The API layer is in charge of dealing with throttling, paging, caching headers, parsing request bodies, and preparing responses. All of that, ...
Read more >
Routes and Endpoints | REST API Handbook
A route is the “name” you use to access endpoints, used in the URL. A route can have multiple endpoints associated with it,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found