mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-12-17 17:56:42 +00:00
Update settings.tsx
This commit is contained in:
parent
c65fef638e
commit
8cd1ac6a4b
@ -336,8 +336,8 @@ export function Settings() {
|
||||
}
|
||||
|
||||
// Then check if request was successful
|
||||
if (!response.ok) {
|
||||
throw new Error(data.message || data.error || "Failed to generate API token")
|
||||
if (!response.ok || !data.success) {
|
||||
throw new Error(data.message || "Failed to generate API token")
|
||||
}
|
||||
|
||||
setApiToken(data.token)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user