summaryrefslogtreecommitdiff
path: root/lib/router.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/router.ml')
-rw-r--r--lib/router.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/router.ml b/lib/router.ml
index a29a8bc..c3b4af2 100644
--- a/lib/router.ml
+++ b/lib/router.ml
@@ -27,6 +27,7 @@ let static (path : Parts.t) (_db : Handler.pool) (_req : Request.t)
: (Response.t, Caqti_error.t) result
=
let pat = Parts.wildcard_match path in
+ Logs.info (fun d -> d "static path %S\n" pat);
match Body.sendfile pat with
| Error _ -> Ok (Response.create `Not_found)
| Ok body ->
@@ -56,7 +57,8 @@ let routes
(* nil - end of path (no more segments) *)
(* @--> - binds the route pattern to the handler function *)
(* Handler.get_posts - the function that handles this route *)
- (* ; `GET, (s "assets" / wildcard) @--> static *)
+ (* NOTE this took fucking forever lol *)
+ ; `GET, (s "assets" /? wildcard) @--> static
; `GET, (s "posts" / int /? nil) @--> Handler.get_post
(* / int - captures an integer parameter (post ID) *)
; `GET, (s "comments" / int /? nil) @--> Handler.get_comment