This commit is contained in:
@@ -177,33 +177,20 @@ export default {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
//Does the database need to be erased?
|
||||
let res = await window.$gz.api.get("license/database-empty");
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
return Promise.reject(res);
|
||||
let dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
"AdminEraseDatabaseWarning",
|
||||
"warning"
|
||||
);
|
||||
if (dialogResult == false) {
|
||||
return;
|
||||
}
|
||||
if (res.data != true) {
|
||||
let dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
"AdminEraseDatabaseWarning",
|
||||
"warning"
|
||||
);
|
||||
if (dialogResult == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
"AdminEraseDatabaseLastWarning",
|
||||
"error"
|
||||
);
|
||||
if (dialogResult == false) {
|
||||
return;
|
||||
}
|
||||
//call erase
|
||||
await window.$gz.api.upsert(
|
||||
"license/permanently-erase-all-data",
|
||||
"I understand"
|
||||
);
|
||||
dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
"AdminEraseDatabaseLastWarning",
|
||||
"error"
|
||||
);
|
||||
if (dialogResult == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
//call seed route
|
||||
|
||||
Reference in New Issue
Block a user