summaryrefslogtreecommitdiff
path: root/lib/handlers.ml
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-06-15 16:02:06 +0200
committerMarius Peter <marius.peter@tutanota.com>2025-06-15 16:02:06 +0200
commitce1110973e02d803e747ffc49572db1abf709923 (patch)
tree405da77d5aeb82016b8151345f936bd91a962c69 /lib/handlers.ml
parent59ab4142a3887c0b34719bb0e56b820ee71d0ca7 (diff)
Regroup Dream_html functionality in Views module.
Diffstat (limited to 'lib/handlers.ml')
-rw-r--r--lib/handlers.ml14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/handlers.ml b/lib/handlers.ml
index deb9635..ff4c4a5 100644
--- a/lib/handlers.ml
+++ b/lib/handlers.ml
@@ -1,6 +1,6 @@
(* -*- mode: tuareg; -*- *)
-let root _req = Views.root () |> Dream_html.respond
+let root _req = Views.root ()
module Repo = struct
open Git_presenters
@@ -20,29 +20,29 @@ module Repo = struct
let* branches = all_branches (repo req) in
let* commits = recent_commits (repo req) 10 in
let authors = [ "John Pork"; "Sebastian Jellybean" ] in
- Views.Repo.summary (repo req) branches commits authors |> Dream_html.respond
+ Views.Repo.summary (repo req) branches commits authors
let log req =
let* commits = recent_commits (repo req) 100 in
- Views.Repo.log (repo req) commits |> Dream_html.respond
+ Views.Repo.log (repo req) commits
let files_at_head req =
let* tree = head_tree (repo req) in
- Views.Repo.files (repo req) tree |> Dream_html.respond
+ Views.Repo.files (repo req) tree
let file_id req =
let id = id_of_req req in
let* blob = blob_of_id (repo req) id in
- Views.Repo.file (repo req) blob |> Dream_html.respond
+ Views.Repo.file (repo req) blob
let refs req =
let* branches = all_branches (repo req) in
- Views.Repo.refs (repo req) branches |> Dream_html.respond
+ Views.Repo.refs (repo req) branches
let commit req =
let id = id_of_req req in
let* commit = commit_of_id (repo req) id in
- Views.Repo.commit (repo req) commit |> Dream_html.respond
+ Views.Repo.commit (repo req) commit
end
let all_handlers =
Copyright 2019--2025 Marius PETER