This commit is contained in:
swrup 2025-11-30 11:33:51 +01:00
parent 2ceecb5aba
commit a95f992881
5 changed files with 18 additions and 9 deletions

View file

@ -2,7 +2,7 @@ version=0.28.1
exp-grouping=preserve exp-grouping=preserve
type-decl=sparse type-decl=sparse
break-infix=fit-or-vertical break-infix=fit-or-vertical
break-collection-expressions=wrap break-collection-expressions=fit-or-vertical
break-sequences=false break-sequences=false
break-infix-before-func=false break-infix-before-func=false
dock-collection-brackets=true dock-collection-brackets=true

View file

@ -56,7 +56,8 @@ let of_string =
choice choice
[ [
char '+' *> return (Some Sign_plus); char '+' *> return (Some Sign_plus);
char '-' *> return (Some Sign_minus); return None; char '-' *> return (Some Sign_minus);
return None;
] ]
in in
let parse_currency = let parse_currency =

View file

@ -17,10 +17,14 @@ let privacy_legal_version = "1"
module Mimetype = struct module Mimetype = struct
let mimetype_extension_assoc = let mimetype_extension_assoc =
[ [
(("text", "plain"), ".txt"); (("text", "markdown"), ".md"); (("text", "plain"), ".txt");
(("text", "html"), ".html"); (("text", "html"), ".htm"); (("text", "markdown"), ".md");
(("application", "pdf"), ".pdf"); (("image", "jpeg"), ".jpg"); (("text", "html"), ".html");
(("image", "jpeg"), ".jpeg"); (("image", "png"), ".png"); (("text", "html"), ".htm");
(("application", "pdf"), ".pdf");
(("image", "jpeg"), ".jpg");
(("image", "jpeg"), ".jpeg");
(("image", "png"), ".png");
(("image", "gif"), ".gif"); (("image", "gif"), ".gif");
] ]

View file

@ -25,7 +25,8 @@ let routes =
let open Vif.Route in let open Vif.Route in
let open Vif.Type in let open Vif.Type in
[ [
get (rel /?? nil) --> hello; get (rel / "terms" /?? nil) --> Static.terms; get (rel /?? nil) --> hello;
get (rel / "terms" /?? nil) --> Static.terms;
get (rel / "privacy" /?? nil) --> Static.privacy; get (rel / "privacy" /?? nil) --> Static.privacy;
get (rel / "management" / "keys" /?? nil) --> Management.keys_get; get (rel / "management" / "keys" /?? nil) --> Management.keys_get;
post any (rel / "management" / "keys" /?? nil) --> Management.keys_post; post any (rel / "management" / "keys" /?? nil) --> Management.keys_post;

View file

@ -71,8 +71,11 @@ let preflight =
Caqti_type.(unit ->. unit) Caqti_type.(unit ->. unit)
[ [
"SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL \ "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL \
SERIALIZABLE;"; "SET enable_sort=OFF;"; "SET enable_seqscan=OFF;"; SERIALIZABLE;";
"SET enable_mergejoin=OFF;"; "SET search_path TO exchange;"; "SET enable_sort=OFF;";
"SET enable_seqscan=OFF;";
"SET enable_mergejoin=OFF;";
"SET search_path TO exchange;";
] ]
in in
fun (module Conn : Caqti_miou.CONNECTION) -> fun (module Conn : Caqti_miou.CONNECTION) ->