client/web: add initial framework for exit node selector
Updates tailscale/corp#14335 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:

committed by
Sonia Appasamy

parent
de2af54ffc
commit
5e095ddc20
@ -75,7 +75,7 @@ export default function useNodeData() {
|
||||
: data.AdvertiseExitNode,
|
||||
}
|
||||
|
||||
apiFetch("/data", "POST", update, { up: "true" })
|
||||
return apiFetch("/data", "POST", update, { up: "true" })
|
||||
.then((r) => r.json())
|
||||
.then((r) => {
|
||||
setIsPosting(false)
|
||||
@ -89,7 +89,10 @@ export default function useNodeData() {
|
||||
}
|
||||
refreshData()
|
||||
})
|
||||
.catch((err) => alert("Failed operation: " + err.message))
|
||||
.catch((err) => {
|
||||
alert("Failed operation: " + err.message)
|
||||
throw err
|
||||
})
|
||||
},
|
||||
[data]
|
||||
)
|
||||
|
Reference in New Issue
Block a user