db points

This commit is contained in:
2024-09-03 15:52:42 +02:00
parent 176cdb33b3
commit 4e5c27d920
11 changed files with 170 additions and 199 deletions

View File

@ -10,11 +10,11 @@
</head>
<body data-bs-theme="dark">
<form action="/gamble" method="post" enctype="multipart/form-data">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname" value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="Doe"><br><br>
<form action="/gamble/<%= person.personId %>" method="post" enctype="multipart/form-data">
<label for="fname">Points:</label><br>
<input type="number" id="points" name="points"><br>
<label for="fname">Secret</label><br>
<input type="text" id="secret" name="secret"><br>
<input type="submit" value="Submit">
</form>
</body>

View File

@ -15,11 +15,11 @@
<div class="row p-5">
<div class="list-group col-3">
<% people.forEach((person) => {%>
<a href='/person/<%= person.id %>'
<a href='/person/<%= person.personId %>'
class="list-group-item list-group-item-action">
<div class="me-auto">
<span class="fw-bold"><%= person.name %></span>
<%= person.id %>
<%= person.pointsTotal %>
</div>
</a>
<% }); %>

View File

@ -11,15 +11,12 @@
<body data-bs-theme="dark">
<a href="/">Index</a>
<a href="/gamble">gamble</a>
<a href="/gamble/<%= person.personId %>">gamble</a>
<p>
Name: <%= person.name %>
</p>
<p>
Id: <%= person.id %>
</p>
<p>
secret: <%= person.secret %>
Points: <%= person.pointsTotal %>
</p>
</body>
</html>