Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Should API routes be revolving around chapters #251

Closed

Description

@Zeko369

@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 #162 (comment)

Activity

  1. Zeko369 commented on Nov 18, 2019

    @Zeko369
    ContributorAuthor

    I mean we could have separate /events, and /events/:eventID routes, but why not just make it simple and have /chapters/1/events/:eventID, and then on setup just create a default chapter that you for example cant delete if it's the only one.

  2. vkWeb commented on Nov 18, 2019

    @vkWeb
    Member

    @Zeko369 You mean the organization will be treated as a chapter if there's no chapter under them?

  3. Zeko369 commented on Nov 18, 2019

    @Zeko369
    ContributorAuthor

    Let me just see if you understand what you're saying. Organization would be a person/organization hosting a chapter docker container?
    If so, my idea was that we tie everything to a chapter, so when you set it up the first time you create one chapter, and if there's only it's treated as the organization.
    example: foobar rails meetup would create a chapter instance running on foobar.rails.org and have one chapter in the database called eg. foobar rails. Later they could add more like barfoo rails, running on the same host.
    Correct me if I'm wrong?

  4. vkWeb commented on Nov 18, 2019

    @vkWeb
    Member

    @Zeko369 You are correct. That's what I was confirming.

  5. allella commented on Nov 18, 2019

    @allella
    Contributor

    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.

  6. vkWeb commented on Nov 18, 2019

    @vkWeb
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions