Refactor to not use status: success, but HTTP codes, and renamed the error key to detail to match FastAPI's own.
This commit is contained in:
@@ -48,7 +48,7 @@ onMounted(async () => {
|
||||
try {
|
||||
const response = await fetch('/auth/create-link', { method: 'POST' })
|
||||
const result = await response.json()
|
||||
if (result.error) throw new Error(result.error)
|
||||
if (result.detail) throw new Error(result.detail)
|
||||
|
||||
url.value = result.url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user