Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Stéphane Épardaud <[email protected]>
  • Loading branch information
ia3andy and FroMage authored Jan 18, 2024
1 parent 22bf44d commit 2e1abcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions integration-tests/src/main/java/rest/HtmxApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ public TemplateInstance index() {
return Templates.index(contactService.contacts().values());
}

public TemplateInstance view(@RestPath("id") int id) {
public TemplateInstance view(@RestPath int id) {
if (!contactService.contacts().containsKey(id)) {
throw new IllegalArgumentException("Invalid id: " + id);
}
return Templates.view(contactService.contacts().get(id));
}

public TemplateInstance edit(@RestPath("id") int id) {
public TemplateInstance edit(@RestPath int id) {
if (!contactService.contacts().containsKey(id)) {
throw new IllegalArgumentException("Invalid id: " + id);
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/resources/templates/tags/gravatar.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<img src="https://www.gravatar.com/avatar/{it.gravatarHash} {_args.skip('gravatarHash').asHtmlAttributes.safe}/>
<img src="https://www.gravatar.com/avatar/{it.gravatarHash} {_args.skip('it').asHtmlAttributes.safe}/>

0 comments on commit 2e1abcf

Please sign in to comment.