fmt
This commit is contained in:
parent
2003c52005
commit
95ebc4f9cf
2 changed files with 8 additions and 8 deletions
|
|
@ -14,7 +14,7 @@ let db_uri = Format.sprintf "sqlite3://%s" db
|
||||||
let random_state = Random.State.make_self_init ()
|
let random_state = Random.State.make_self_init ()
|
||||||
|
|
||||||
module Db =
|
module Db =
|
||||||
(val Caqti_blocking.connect (Uri.of_string db_uri) |> Caqti_blocking.or_fail)
|
(val Caqti_blocking.connect (Uri.of_string db_uri) |> Caqti_blocking.or_fail)
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
let set_foreign_keys_on =
|
let set_foreign_keys_on =
|
||||||
|
|
|
||||||
|
|
@ -345,14 +345,14 @@ let babillard_post request =
|
||||||
; ("thread-comment", [ (_, comment) ])
|
; ("thread-comment", [ (_, comment) ])
|
||||||
]
|
]
|
||||||
| `Ok
|
| `Ok
|
||||||
(("alt", [ (_, alt) ])
|
( ("alt", [ (_, alt) ])
|
||||||
:: ("file", file)
|
:: ("file", file)
|
||||||
:: ("lat-input", [ (_, lat) ])
|
:: ("lat-input", [ (_, lat) ])
|
||||||
:: ("lng-input", [ (_, lng) ])
|
:: ("lng-input", [ (_, lng) ])
|
||||||
:: ("subject", [ (_, subject) ])
|
:: ("subject", [ (_, subject) ])
|
||||||
:: ("tags", [ (_, tags) ])
|
:: ("tags", [ (_, tags) ])
|
||||||
:: ("thread-comment", [ (_, comment) ])
|
:: ("thread-comment", [ (_, comment) ])
|
||||||
:: ([] as categories) ) -> (
|
:: ([] as categories) ) -> (
|
||||||
let categories = List.map snd categories in
|
let categories = List.map snd categories in
|
||||||
match (Float.of_string_opt lat, Float.of_string_opt lng) with
|
match (Float.of_string_opt lat, Float.of_string_opt lng) with
|
||||||
| None, _ -> render_unsafe "Invalide coordinate" request
|
| None, _ -> render_unsafe "Invalide coordinate" request
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue