fix: use home instance
This commit is contained in:
1 parent
28ffdc5ed8
commit
6923ddc25d
1 file changed
+5
-2
@@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
|
const instance = $page.params.instance
|
||||||
|
|
||||||
let captchaRequired = data.site_view.local_site.captcha_enabled
|
let captchaRequired = data.site_view.local_site.captcha_enabled
|
||||||
|
|
||||||
let email: string | undefined = ''
|
let email: string | undefined = ''
|
||||||
@@ -37,7 +39,8 @@
|
|||||||
submitting: boolean = false,
|
submitting: boolean = false,
|
||||||
honeypot: string | undefined = undefined
|
honeypot: string | undefined = undefined
|
||||||
|
|
||||||
const getCaptcha = async () => (captcha = await getClient().getCaptcha())
|
const getCaptcha = async () =>
|
||||||
|
(captcha = await getClient(instance, fetch).getCaptcha())
|
||||||
|
|
||||||
$: captchaAudio = captcha?.ok?.wav
|
$: captchaAudio = captcha?.ok?.wav
|
||||||
? `data:audio/wav;base64,${captcha.ok.wav}`
|
? `data:audio/wav;base64,${captcha.ok.wav}`
|
||||||
@@ -47,7 +50,7 @@
|
|||||||
submitting = true
|
submitting = true
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await getClient().register({
|
const res = await getClient(instance, fetch).register({
|
||||||
username: username,
|
username: username,
|
||||||
email: email,
|
email: email,
|
||||||
password: password,
|
password: password,
|
||||||
|
|||||||
Reference in new issue
Block a user