remove /add_plant, add /plants, a board to replace it

This commit is contained in:
Swrup 2022-01-12 19:34:55 +01:00
parent 0b7983ed6c
commit 8332a16209
13 changed files with 168 additions and 158 deletions

View file

@ -149,14 +149,13 @@ let public_profile request =
| Ok user -> (
match user with
| Some (nick, password, email, (bio, _)) ->
let plants = Plant.view_user_plant_list nick in
let user_info =
Format.sprintf
{|nick = `%s`; password = `%s`; email = `%s`; bio = '%s';
<img src="/user/%s/avatar" class="img-thumbnail" alt="Your avatar picture">|}
nick password email (Dream.html_escape bio) nick
in
user_info ^ plants
user_info
| None -> "incoherent db answer" )
| Error e -> Format.sprintf "db error: %s" (Caqti_error.show e)