mconf-web
mconf-web copied to clipboard
Review and create a standard for xml and js responses
Author Name: Leonardo Daronco (Leonardo Daronco) Original Redmine Issue: 970, http://dev.mconf.org/redmine/issues/970 Original Date: 2013-09-03
In the refactoring for version 2 several responses to js and xml in the controllers were removed or modified, but they are not being properly tested and most of them are not even being used.
We should review all controllers to remove possibly all xml responses and keep only the js responses we are using.
For js responses that are left, we should have default error and success messages. What should be returned when an error occurs? A string message? A status? The best idea I know so far is to return the target object (if there is one) on success and an error status plus a message on error. The object returned is useful for the application to check if the object was really updated, see #633.