wip: login redirect

This commit is contained in:
Swrup 2022-02-20 18:02:25 +01:00
parent e279acf8db
commit b21671b56a
5 changed files with 41 additions and 32 deletions

View file

@ -3,7 +3,8 @@ let f thread_view thread_id request =
<%s! thread_view %>
% begin match Dream.session "nick" request with
% | None ->
% let redirect = Dream.to_percent_encoded (Format.sprintf "redirect=/thread/%s" thread_id) in
<a href="/login?<%s redirect%>">Login to reply!</a>
% | Some _ ->
<div class="post-form">
<%s! Dream.form_tag ~action:( Format.sprintf "/thread/%s" thread_id)