Giter Club home page Giter Club logo

Comments (2)

gravitystorm avatar gravitystorm commented on June 24, 2024

Fixed by #4859

from openstreetmap-website.

gravitystorm avatar gravitystorm commented on June 24, 2024

Just as a passing comment here - in #4859 I managed to extract check_api_readable into api_controller (since it applies by default to most controllers).

I thought about doing something similar with check_api_writable, since there's a frequent pattern of:

before_action :check_api_writable, :only => [:create, :update, :destroy]

I think this could apply by default to all api controllers - for those action names, you probably want to check the database is writeable by default.

What stands in the way is that many of our api controllers aren't (yet) refactored to use resourceful routing - they have idiosyncratic action names like :subscribe or :update_all. This is another place where resourceful routing refactoring, although a substantial amount of work, would prove useful in making the code easier to maintain and to build new features.

from openstreetmap-website.

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.