mirror of
https://github.com/ellite/Wallos.git
synced 2025-12-23 23:18:07 -05:00
Automatically run migration script when loading the registration page.
This commit is contained in:
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();
|
||||
};
|
||||
Reference in New Issue
Block a user