This commit is contained in:
pena 2022-04-03 17:56:02 +02:00 committed by Swrup
parent 2003c52005
commit 95ebc4f9cf
2 changed files with 8 additions and 8 deletions

View file

@ -345,14 +345,14 @@ let babillard_post request =
; ("thread-comment", [ (_, comment) ])
]
| `Ok
(("alt", [ (_, alt) ])
( ("alt", [ (_, alt) ])
:: ("file", file)
:: ("lat-input", [ (_, lat) ])
:: ("lng-input", [ (_, lng) ])
:: ("subject", [ (_, subject) ])
:: ("tags", [ (_, tags) ])
:: ("thread-comment", [ (_, comment) ])
:: ([] as categories) ) -> (
:: ("lat-input", [ (_, lat) ])
:: ("lng-input", [ (_, lng) ])
:: ("subject", [ (_, subject) ])
:: ("tags", [ (_, tags) ])
:: ("thread-comment", [ (_, comment) ])
:: ([] as categories) ) -> (
let categories = List.map snd categories in
match (Float.of_string_opt lat, Float.of_string_opt lng) with
| None, _ -> render_unsafe "Invalide coordinate" request