Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

API: PUT conflict on apps #367

akavlie opened this Issue Apr 7, 2012 · 0 comments


None yet
2 participants

akavlie commented Apr 7, 2012

We have two possible PUT reuquests on /apps/<appname> -- one for updating the starting app name, and another for starting/stopping the app.

Taking two completely separate actions, depending on the key sent, is problematic, because the convention is to send the full model when doing a PUT request.

This is causing a problem with the admin panel:

  1. Start/stop an app as appropriate
  2. Response has start attribute, which gets copied to the model
  3. Start/stop the same app without refreshing page
  4. Full model info, including both running and start attributes is sent to the API. That seems to trigger the starting app name update, not the start/stop app action.

Suggested changes:

  1. API needs to check for changes on both attributes when a PUT request is sent to this endpoint
  2. Respective actions should be triggered only if the value is changed

@alejandro alejandro was assigned Jul 12, 2012

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