This commit is contained in:
Swrup 2022-01-17 21:55:09 +01:00
parent 54b638ed20
commit 3b8e1c26d6
2 changed files with 5 additions and 3 deletions

View file

@ -1,4 +1,4 @@
version=0.19.0 version=0.20.1
align-cases=false align-cases=false
align-constructors-decl=false align-constructors-decl=false
align-variants-decl=false align-variants-decl=false

View file

@ -199,7 +199,8 @@ let newthread_post ~board request =
let adress = let adress =
Format.asprintf "/%a/%s" Babillard.pp_board board thread_id Format.asprintf "/%a/%s" Babillard.pp_board board thread_id
in in
Dream.respond ~status:`See_Other ~headers:[ ("Location", adress) ] Dream.respond ~status:`See_Other
~headers:[ ("Location", adress) ]
"Your thread was posted!" "Your thread was posted!"
| Error e -> render_unsafe e request ) ) ) | Error e -> render_unsafe e request ) ) )
| `Ok _ -> Dream.empty `Bad_Request | `Ok _ -> Dream.empty `Bad_Request
@ -253,7 +254,8 @@ let reply_post request =
match res with match res with
| Ok post_id -> | Ok post_id ->
let adress = Format.sprintf "/babillard/%s#%s" parent_id post_id in let adress = Format.sprintf "/babillard/%s#%s" parent_id post_id in
Dream.respond ~status:`See_Other ~headers:[ ("Location", adress) ] Dream.respond ~status:`See_Other
~headers:[ ("Location", adress) ]
"Your reply was posted!" "Your reply was posted!"
| Error e -> render_unsafe e request ) | Error e -> render_unsafe e request )
| `Ok _ -> Dream.empty `Bad_Request | `Ok _ -> Dream.empty `Bad_Request