Giter Site home page Giter Site logo

Comments (3)

begedin avatar begedin commented on July 19, 2024

Blocked by #12

from deprecated-code-corps-rails-api.

begedin avatar begedin commented on July 19, 2024

Based on how #12 is being implemented, we could go in multiple directions with this one. If we want simple RESTful routes, then we'd need

First approach

  • POST /contributors - This one creates a new Contributor record, with project set to provided project, user set to current_user and status set to "pending". It can be accessible by any logged in user.
  • PATCH /contributors . This one takes an existing Contributor record and sets its status to some other value. At first, it can be used by an admin or owner to approve a pending Contributor record. Later, it can also be used to change contribution levels (the value of status) for other contributors as well.

This first approach gives more flexibility, but also puts some responsibility on the client. When the user clicks on "apply for a contributor" (or whatever they click on), the client app will need to know this means creating a new contributor record with project set to the project currently being viewed.

Second approach

We have routes such as

  • POST /projects/:id/apply_for_collaboration (or some other similar route)
  • `POST /contributors/:id/approve,
  • POST /contributors/:id/promote
  • etc.

The actions are more atomic this way and the routes are more verbose and descriptive, but I'm not really sure the client will be able to be dumber this way, especially an ember client.

Due to that, I'll go with the first approach for now, but I can shift to the second if necessary.

from deprecated-code-corps-rails-api.

begedin avatar begedin commented on July 19, 2024

@joshsmith I believe this was handled by #70. We now have a POST /contributors route, which enables joining a project.

However, I believe we should change this route so it's nested under the project - POST /:member_slug/:projet_slug/contributors to maintain consistency. I'm creating a new issue to address this and closing this one - #107

from deprecated-code-corps-rails-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.