style: code cleanup
This commit is contained in:
parent
3beaddf0bd
commit
e44c7d0c2e
3 changed files with 11 additions and 10 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue