fix: trim form inputs

This commit is contained in:
Xyphyn committed 2023-08-01 15:02:58 -07:00
1 parent d9b55124db
commit 23f0d7aeb4
1 file changed
+2 -1
+2 -1
View File
@@ -28,12 +28,13 @@
data.loading = true data.loading = true
try { try {
data.instance = data.instance.trim()
if (!(await validateInstance(data.instance))) { if (!(await validateInstance(data.instance))) {
throw new Error('Failed to contact that instance. Is it down?') throw new Error('Failed to contact that instance. Is it down?')
} }
const response = await getClient(data.instance).login({ const response = await getClient(data.instance).login({
username_or_email: data.username, username_or_email: data.username.trim(),
password: data.password, password: data.password,
totp_2fa_token: data.totp, totp_2fa_token: data.totp,
}) })