This commit is contained in:
Andreas 2019-09-17 15:59:28 +02:00
parent d70addf352
commit 81eb753556
2 changed files with 9 additions and 1 deletions

View File

@ -4,7 +4,7 @@ if(isset($_POST['auth'])){
createDB();
}
}else{
echo('test');
echol('you have no authorization to do that');
}
function createDB(){

View File

@ -1,4 +1,12 @@
<?php
if(isset($_POST['auth'])){
if($_POST['auth'] == getenv('ADMIN_ACTION_KEY')){
populateDB();
}
}else{
echol('you have no authorization to do that');
}
function populateDB(){
try{
if(getenv("SQL_CREDENTIALS") !== false){