diff options
author | Marius Peter <marius.peter@tutanota.com> | 2025-02-02 17:08:52 +0100 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2025-02-02 17:08:52 +0100 |
commit | aacec6588c3aebffda6c6221b02622576c85c407 (patch) | |
tree | 213da645d447ac0e82a9209412f94fa78a8bc594 /bin | |
parent | 6e8e49ba49beeeb63e1e027fc23e8883a1185109 (diff) |
Change Views render function return type.
All Views submodules' render functions now return a Dream_html node
promise, rather than the node itself.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/main.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/main.ml b/bin/main.ml index 895bfb8..c30e4fc 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -2,8 +2,9 @@ let () = Dream.run @@ Dream.logger @@ Dream.router [ - Dream.get "/" (fun _ -> Ogit.Handlers.ogit_root ()); - Dream.get "/:repo_name" (fun request -> - Ogit.Handlers.repo_root @@ Dream.param request "repo_name"); + Dream.get "/" (fun _req -> Ogit.Handlers.ogit_root _req); + Dream.get "/:repo_name" (fun req -> + let repo_name = Dream.param req "repo_name" in + Ogit.Handlers.repo_root repo_name); Dream.get "/static/**" (Dream.static "./lib/static"); ] |