UI: Clear configured credentials on Island reset

This commit is contained in:
Shreya Malviya 2022-07-13 18:54:13 +05:30
parent ef25dd936b
commit 1e9d193a6d
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ const IslandResetModal = (props: Props) => {
if (res.status === 200) { if (res.status === 200) {
return auth.authFetch('/api/clear-simulation-data', {method: 'POST'}) return auth.authFetch('/api/clear-simulation-data', {method: 'POST'})
}}) }})
.then(res => {
if (res.status === 200) {
return auth.authFetch('/api/propagation-credentials/configured-credentials', {method: 'DELETE'})
}})
.then(res => { .then(res => {
if (res.status === 200) { if (res.status === 200) {
return auth.authFetch('/api/island-mode', {method: 'POST', body: '{"mode": "unset"}'}) return auth.authFetch('/api/island-mode', {method: 'POST', body: '{"mode": "unset"}'})