summaryrefslogtreecommitdiff
path: root/lib/handlers.ml
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-05-25 15:25:56 +0200
committerMarius Peter <marius.peter@tutanota.com>2025-05-25 15:25:56 +0200
commit1f904a2eb07c5d98288aeb6d762f8f4668df79ca (patch)
treeea0d86f2e815c5d52fc129d054e688d5dbdc259c /lib/handlers.ml
parentf0c8906cd19479447ff5d0c1044ecbad6ab845d6 (diff)
Rename repo_name to repo.
Diffstat (limited to 'lib/handlers.ml')
-rw-r--r--lib/handlers.ml19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/handlers.ml b/lib/handlers.ml
index 17b9eab..a99f8ae 100644
--- a/lib/handlers.ml
+++ b/lib/handlers.ml
@@ -9,23 +9,22 @@ let ( let* ) m f =
let root _req = Views.root () |> Dream_html.respond
module Repo = struct
- let repo_path req = Dream.param req "repo_name"
+ let repo req = Dream.param req "repo_name"
let summary req =
- let* branches = Git_helpers.Branch.all_branches (repo_path req) in
- let* commits = Git_helpers.Commit.recent_commits (repo_path req) 10 in
+ let* branches = Git_helpers.Branch.all_branches (repo req) in
+ let* commits = Git_helpers.Commit.recent_commits (repo req) 10 in
let authors = [ "John Pork"; "Sebastian Jellybean" ] in
- Views.Repo.summary (repo_path req) branches commits authors
- |> Dream_html.respond
+ Views.Repo.summary (repo req) branches commits authors |> Dream_html.respond
- let refs req = Views.Repo.refs (repo_path req) |> Dream_html.respond
- let log req = Views.Repo.log (repo_path req) |> Dream_html.respond
- let tree req = Views.Repo.tree (repo_path req) |> Dream_html.respond
+ let refs req = Views.Repo.refs (repo req) |> Dream_html.respond
+ let log req = Views.Repo.log (repo req) |> Dream_html.respond
+ let tree req = Views.Repo.tree (repo req) |> Dream_html.respond
let commit req =
let id = match Dream.query req "id" with Some id -> id | None -> "" in
- let* commit = Git_helpers.Commit.of_id (repo_path req) id in
- Views.Repo.commit (repo_path req) commit |> Dream_html.respond
+ let* commit = Git_helpers.Commit.of_id (repo req) id in
+ Views.Repo.commit (repo req) commit |> Dream_html.respond
end
let all_handlers =
Copyright 2019--2025 Marius PETER