Completed user generation script
This commit is contained in:
16
index.js
16
index.js
@@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user