Completed user generation script

This commit is contained in:
2022-06-26 02:40:39 +00:00
parent 0f7aa1d448
commit 49220107c2
6 changed files with 86 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
const DEBUG = false;
var DEBUG = false;
var isMobile = false;
const dbp = (msg) => {
@@ -104,16 +104,28 @@ const sendSSH = (key, id, token) => {
...SwalConfig,
title: "Success!",
text: "Your key has been uploaded to the server."
}).then(()=>{
window.location.reload();
});
}else{
Swal.fire({
...SwalConfig,
title: "Failed!",
text: response.error
}).then(()=>{
window.location.reload();
});
}
}).fail(() => {
}).fail((resp) => {
dbp("Failed");
dbd(resp);
Swal.fire({
...SwalConfig,
title: "Failed!",
text: resp.toString()
}).then(()=>{
window.location.reload();
});
});
}