mirror of
https://github.com/apache/struts.git
synced 2026-08-11 09:36:57 +00:00
Fixing restful to use right methods (docs right, code wrong)
WW-1475 git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@525431 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -114,7 +114,7 @@ public class Restful2ActionMapper extends DefaultActionMapper {
|
||||
mapping.setMethod("index");
|
||||
|
||||
// Creating a new entry on POST e.g. foo/
|
||||
} else if (isPut(request)) {
|
||||
} else if (isPost(request)) {
|
||||
mapping.setMethod("create");
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public class Restful2ActionMapper extends DefaultActionMapper {
|
||||
mapping.setMethod("view");
|
||||
|
||||
// Updating an item e.g. foo/1
|
||||
} else if (isPost(request)) {
|
||||
} else if (isPut(request)) {
|
||||
mapping.setMethod("update");
|
||||
|
||||
// Removing an item e.g. foo/1
|
||||
|
||||
Reference in New Issue
Block a user