Replace type UserID with a structure

This commit is contained in:
2022-04-19 19:40:36 +02:00
parent feb6db09b9
commit 94aeefe450
8 changed files with 17 additions and 15 deletions

View File

@ -6,7 +6,7 @@
<div class="form-group">
<label class="form-label mt-4" for="userID">User ID</label>
<input class="form-control" id="userID" type="text" readonly=""
name="uid" value="{{ u.uid }}"/>
name="uid" value="{{ u.uid.0 }}"/>
</div>
<!-- User name -->
@ -145,7 +145,7 @@
return;
const userID = await find_username(usernameEl.value);
usernameEl.classList.add((userID === null || userID === "{{ u.uid }}") ? "is-valid" : "is-invalid");
usernameEl.classList.add((userID === null || userID === "{{ u.uid.0 }}") ? "is-valid" : "is-invalid");
} catch(e) {
console.error(e);