return rawStringUtf8("Invalid token");
final String name = p.name();
if (name != null) {
// create the group
final Group g = new KTrans<Group>(pm) {
@Override protected Group call() {
Group g = new Group();
g.setName(name);
pm.makePersistent(g);
return g;
}
}.go();
// create first admin user
String authToken = new KTrans<String>(pm) {
@Override protected String call() {
User u = User.newUser(g.getKey());
u.setEmail(email);
u.setFirstName(Utils.notNull(p.firstName(), "First name is required"));
u.setLastName(Utils.notNull(p.lastName(), "Last name is required"));
u.setGender(Utils.notNull(p.gender(), "Gender is required"));