🐛 Use api to fetch magic spell instead of page data

This commit is contained in:
2025-07-24 01:32:35 +08:00
parent d95ea249fb
commit 362713873b
3 changed files with 1 additions and 36 deletions

View File

@@ -58,7 +58,7 @@ const submitting = ref(false)
const done = ref(false)
const spellTypes = [
'Account Acivation',
'Account Activation',
'Account Deactivation',
'Account Deletion',
'Reset Password',
@@ -66,12 +66,6 @@ const spellTypes = [
]
async function fetchSpell() {
// @ts-ignore
if (window.__APP_DATA__ != null) {
// @ts-ignore
spell.value = window.__APP_DATA__['Spell']
return
}
const resp = await fetch(`/api/spells/${encodeURIComponent(spellWord)}`)
if (resp.status === 200) {
const data = await resp.json()