Automatically run migration script when loading the registration page.
This commit is contained in:
parent
3237d1f22f
commit
323679e771
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
!/images/uploads/logos/wallos.png
|
||||
.DS_Store
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
@ -52,7 +52,18 @@ function changeLanguage(selectedLanguage) {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
function runDatabaseMigration() {
|
||||
let url = "endpoints/db/migrate.php";
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error(translate('network_response_error'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
restoreFormFields();
|
||||
removeFromStorage();
|
||||
runDatabaseMigration();
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user