minor updates
git-svn-id: svn://anubis/gvsu@281 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
d044e20d13
commit
814a9044e9
@ -164,7 +164,7 @@ public class UserResource extends Resource
|
|||||||
// Parse the entity as a web form
|
// Parse the entity as a web form
|
||||||
Form form = new Form(entity);
|
Form form = new Form(entity);
|
||||||
|
|
||||||
// update the loaded Book object
|
// update the loaded User object
|
||||||
String value = form.getFirstValue("user[host]");
|
String value = form.getFirstValue("user[host]");
|
||||||
if (value != null)
|
if (value != null)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ public class UsersResource extends Resource
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle HTTP POST. Create a new book resource.
|
* Handle HTTP POST. Create a new user resource.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void post(Representation entity)
|
public void post(Representation entity)
|
||||||
@ -133,7 +133,7 @@ public class UsersResource extends Resource
|
|||||||
Form form = new Form(entity);
|
Form form = new Form(entity);
|
||||||
|
|
||||||
// create a new User object
|
// create a new User object
|
||||||
User user = new Book();
|
User user = new User();
|
||||||
user.setUserName(form.getFirstValue("user[name]"));
|
user.setUserName(form.getFirstValue("user[name]"));
|
||||||
user.setHost(form.getFirstValue("user[host]"));
|
user.setHost(form.getFirstValue("user[host]"));
|
||||||
user.setPort(Integer.parseInt(form.getFirstValue("user[port]")));
|
user.setPort(Integer.parseInt(form.getFirstValue("user[port]")));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user