cleanup user.ml, add plant.ml
This commit is contained in:
parent
dfb193476f
commit
d647486ad8
6 changed files with 255 additions and 234 deletions
10
src/db.ml
10
src/db.ml
|
|
@ -9,5 +9,15 @@ let () =
|
|||
|
||||
let db = Filename.concat db_root "permap.db"
|
||||
|
||||
let random_state = Random.State.make_self_init ()
|
||||
|
||||
let with_db ?mode ?mutex ?cache ?vfs ?timeout f =
|
||||
Sqlite3_utils.with_db ?mode ?mutex ?cache ?vfs ?timeout db f
|
||||
|
||||
module Db =
|
||||
( val Caqti_blocking.connect (Uri.of_string ("sqlite3://" ^ db))
|
||||
|> Caqti_blocking.or_fail )
|
||||
|
||||
(* TODO do image validation: length and MIME types with conan*)
|
||||
(* TODO do the same for text input: check length, forbidden chars and have a forbidden words filter*)
|
||||
let is_valid_image _content = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue