Skip to content

Commit

Permalink
Small fixes: delete user and device menu button
Browse files Browse the repository at this point in the history
  • Loading branch information
leechwort committed Dec 1, 2023
1 parent 68ec9de commit 9e8350f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</a>
</li>
<li>
<a href="/devices" data-bs-toggle="collapse" class="nav-link px-sm-0 px-2">
<a href="/devices" class="nav-link px-sm-0 px-2">
<i class="fs-5 bi-phone-vibrate-fill"></i><span class="ms-1 d-none d-sm-inline">Devices</span> </a>
</li>
<li>
Expand Down
4 changes: 2 additions & 2 deletions app/templates/prismo/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ <h5 class="card-title">Add last used RFID card as new user</h5>
</div>

<script>
async function deleteUser(deviceId) {
async function deleteUser(userKey) {
try {
const response = await fetch(`/api/devices/${deviceId}`, { method: 'DELETE' });
const response = await fetch(`/api/users/${userKey}`, { method: 'DELETE' });
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
Expand Down

0 comments on commit 9e8350f

Please sign in to comment.