Changed how client sends pronouns.

main
Luna 2021-07-17 16:13:46 -07:00
parent c78be1a16b
commit a2f6d779cd
2 changed files with 11 additions and 9 deletions

View File

@ -20,22 +20,24 @@
<input type="text" id="uname" name="uname" required><br> <input type="text" id="uname" name="uname" required><br>
<label for="pin">Pin:</label><br> <label for="pin">Pin:</label><br>
<input type="number" id="pin" name="pin" required><br> <input type="number" id="pin" name="pin" required><br><br>
<label for="selected">Pronouns:</label><br> <label for="selected">Pronouns:</label><br>
<select id="selected" name="selected"> <select id="selected" name="selected">
<option value="nothing"></option> <option value="nothing"></option>
<option value="she">she/her</option> <option value="she.her">she/her</option>
<option value="he">he/him</option> <option value="he.him">he/him</option>
<option value="they">they/them</option> <option value="they.them">they/them</option>
<option value="it">it</option> <option value="it.its">it</option>
<option value="fae">fae/faer</option> <option value="fae.faer">fae/faer</option>
</select><br> </select>
<p>Or.</p> <p>Or.</p>
<label for="custom">Custom Pronouns:</label><br> <label for="custom">Custom Pronouns:</label><br>
<input type="text" id="custom" name="custom"><br><br> <input type="text" id="custom" name="custom">
<p>Format: pronoun/otherpronoun</p><br>
<input type="submit" value="Register"> <input type="submit" value="Register">
</form> </form>

View File

@ -39,7 +39,7 @@ async function getUname() {
} }
async function register() { async function register() {
const rawResponse = await fetch(`${API_URL}/api/register/${uname.toString().toLowerCase()}/${pin.toString()}/${pronouns.toString().toLowerCase()}`, { const rawResponse = await fetch(`${API_URL}/api/register/${uname.toString().toLowerCase()}/${pin.toString()}/${pronouns.toString().toLowerCase().replace("/", ".")}`, {
method: 'POST', method: 'POST',
headers: { headers: {
'Accept': 'text/plain' 'Accept': 'text/plain'