Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
Minik Gaarde Lambrecht
2021-04-06 20:17:15 +02:00
12 changed files with 475 additions and 4 deletions
+2 -3
View File
@@ -85,12 +85,11 @@ if(isset($_POST["dbSetup"])){
file_put_contents($conFilePath, json_encode($dbCon));
require_once('../bootstrap.php');
try{
$capsule->Connection()->getPdo();
require_once('../bootstrap.php');
} catch (\Exception $e) {
http_response_code(400);
file_put_contents($conFilePath, NULL);
http_response_code(400);
echo json_encode(["message" => "Could not connect to the database. Please check your configuration. error:" . $e]);
exit();
}
+8
View File
@@ -0,0 +1,8 @@
<?php
use Backend\Models\AdminUser;
require_once ('Database/databaseMigration.php');
AdminUser::firstOrCreate([
'user_name' => '', 'password' => password_hash('',PASSWORD_DEFAULT)
]);