Takes - review changes

This commit is contained in:
Anshul BANSAL 2020-02-24 15:17:18 +02:00
parent c82c692eb3
commit 93e7e1a51c
2 changed files with 11 additions and 5 deletions

View File

@ -13,7 +13,10 @@ public final class TakesContact implements Take {
@Override
public Response act(Request req) throws IOException {
return new RsWithStatus(new RsWithType(new RsWithBody("Contact us at https://www.baeldung.com"), "text/html"), 200);
return new RsWithStatus(
new RsWithType(
new RsWithBody("Contact us at https://www.baeldung.com"),
"text/html"), 200);
}
}

View File

@ -15,7 +15,10 @@ public final class TakesIndex implements Take {
public Response act(final Request req) throws IOException {
RqFormSmart form = new RqFormSmart(req);
String username = form.single("username");
return new RsHtml(new RsVelocity(this.getClass().getResource("/templates/index.vm"), new RsVelocity.Pair("username", username)));
return new RsHtml(
new RsVelocity(this.getClass().getResource("/templates/index.vm"),
new RsVelocity.Pair("username", username))
);
}
}