From ce1110973e02d803e747ffc49572db1abf709923 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 15 Jun 2025 16:02:06 +0200 Subject: Regroup Dream_html functionality in Views module. --- lib/handlers.ml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/handlers.ml') 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 = -- cgit v1.2.3