summaryrefslogtreecommitdiff
path: root/lib/router.ml
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-07-18 18:54:42 +0700
committerpolwex <polwex@sortug.com>2025-07-18 18:54:42 +0700
commite1bc08ed2b35a9b9faf76fab8316aec4224782cb (patch)
tree11444dcdf0078e7d04f8851c181bf375ed382096 /lib/router.ml
parentd43776f556ba63d2e6f48fdf6f94ba3b8f1e0199 (diff)
mmm
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