style: code cleanup

This commit is contained in:
Twig 2025-07-19 17:15:44 +02:00
parent 3beaddf0bd
commit e44c7d0c2e
No known key found for this signature in database
3 changed files with 11 additions and 10 deletions

View file

@ -23,9 +23,11 @@ async function sendRequest() {
try {
await addFriend(inputField.value.value)
alert("Friend request sent!")
} catch {
alert("Request failed :(")
}
} catch (error: any) {
if (error?.response?.status !== 200) {
alert(`error ${error?.response?.status} met whilst trying to add friend\n"${error?.response._data?.message}"`)
}
}
}
}
</script>