redirect on private struct

This commit is contained in:
Your Name 2026-08-19 11:21:36 -04:00
parent e179814859
commit 8bcaf264fa
3 changed files with 39 additions and 10 deletions

View file

@ -1,12 +1,13 @@
<form action="/login" method="POST">
<% if (it.next) { %><input type="hidden" name="next" value="<%= it.next %>"><% } %>
<input name="username" placeholder="username">
<input name="password" placeholder="password">
<button type="submit">
come home
</button>
<% if (it.error) { %>
<%= error %>
<%= it.error %>
<% } %>
<br>
<div> or you can <a href="/register">move in here</a>.
<div> or you can <a href="/register<%= it.next ? '?next=' + encodeURIComponent(it.next) : '' %>">move in here</a>.
</form>

View file

@ -1,4 +1,5 @@
<form action="/register" method="POST">
<% if (it.next) { %><input type="hidden" name="next" value="<%= it.next %>"><% } %>
<input name="username" placeholder="username">
<input name="password" placeholder="password">
<button type="submit">
@ -7,4 +8,6 @@
<% if (it.error) { %>
<%= it.error %>
<% } %>
<br>
<div> or you can <a href="/login<%= it.next ? '?next=' + encodeURIComponent(it.next) : '' %>">come home</a>.
</form>