[ 
https://issues.apache.org/jira/browse/RAVE-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13750499#comment-13750499
 ] 

Chris Geer commented on RAVE-1048:
----------------------------------

I feel like it's JPA all over again. 

I understand the reason why you want to do it and the trade-off but I'm trying 
to come at it from a slightly different perspective. Red flags always go up for 
me when we talk about changing the server data model or access strategy to 
support a particular end point (in our case Angular). 

At the end of the day this is a relatively harmless change but let me ask this 
question. I can almost guarantee at some point we'll have to have different 
logic for a create vs an update (validation, permissions...). Assuming for a 
second that is true, wouldn't you need to have a different method on the 
resource anyway (or at least know you are doing a create vs update somewhere 
and could call a different method)? 

As an example, RegionWidget (our favorite). When you create it you need to link 
it to a Widget with a widgetID. But when you update it, you really shouldn't be 
able to change the widgetID as that could cause all sorts of problems. 
                
> Have update rest methods accept both put and post requests.
> -----------------------------------------------------------
>
>                 Key: RAVE-1048
>                 URL: https://issues.apache.org/jira/browse/RAVE-1048
>             Project: Rave
>          Issue Type: Sub-task
>          Components: rave-core
>            Reporter: Erin Noe-Payne
>             Fix For: 0.23
>
>
> Angular's $resource service uses post methods to save new or updated 
> resources. For simplicity, we should update the rest api endpoints so that 
> update methods accept PUT or POST requests.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to