Use Lwt.Syntax.

Commit
be6d3c4c365e15a8affd29229d13b81c8879c095
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
lib/handlers.ml
index 27ca0b68..f4a7d7b0 100644..100644
@@ -1,10 +1,12 @@
1 Added: open Lwt.Syntax
2 Added:
1 3 let ogit_root _req = Views.ogit_root () |> Dream_html.respond
2 4
3 5 let repo_summary req =
4 6 let repo_path = Dream.param req "repo_name" in
5 Removed: let%lwt branches_result = Git_helpers.all_branches repo_path in
6 Removed: let%lwt commits_result = Git_helpers.latest_commits repo_path 10 in
7 Removed: match (branches_result, commits_result) with
7 Added: let* branches = Git_helpers.all_branches repo_path
8 Added: and* commits = Git_helpers.latest_commits repo_path 10 in
9 Added: match (branches, commits) with
8 10 | Ok branches, Ok commits ->
9 11 Views.repo_summary repo_path ~branches ~commits |> Dream_html.respond
10 12 | Error msg, _ | _, Error msg -> Views.error_page msg |> Dream_html.respond