✨ Closes #234
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
onMount(() => {
|
||||
if (browser) {
|
||||
prefetch_username();
|
||||
hcaptcha = window.hcaptcha;
|
||||
if (hcaptcha.render) {
|
||||
hcaptchaWidgetID = hcaptcha.render('hcaptcha', {
|
||||
@@ -54,6 +55,15 @@
|
||||
}
|
||||
});
|
||||
|
||||
const prefetch_username = async () => {
|
||||
const res = await fetch('/api/v1/users/me');
|
||||
if (res.status !== 200) {
|
||||
return;
|
||||
}
|
||||
const json = await res.json();
|
||||
username = json.username;
|
||||
};
|
||||
|
||||
const set_game_pin = async () => {
|
||||
let process_var;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user