Skip to content

Commit

Permalink
Update UrlsController method show
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman3455 committed Jan 11, 2025
1 parent e7a587a commit 973bf45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/hexlet/code/controller/UrlsController.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public static void show(Context ctx) throws SQLException {
.orElseThrow(() -> new NotFoundResponse("Page not found"));
var urlChecks = UrlCheckRepository.getChecks(id);
var page = new UrlPage(url, urlChecks);
page.setFlashMessage(ctx.consumeSessionAttribute("flash-message"));
page.setFlashType(ctx.consumeSessionAttribute("flash-type"));
ctx.render("urls/show.jte", model("page", page));
}
}

0 comments on commit 973bf45

Please sign in to comment.