basic auth
This commit is contained in:
parent
0bd8a0cfc0
commit
73dafb8999
8 changed files with 274 additions and 0 deletions
11
scripts/init.php
Normal file
11
scripts/init.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
require("../libs/test_secret.php");
|
||||
|
||||
global $db;
|
||||
|
||||
$sql = file_get_contents('../scripts/init.sql', true);
|
||||
|
||||
$db->exec($sql);
|
||||
|
||||
echo "Database was set up.";
|
||||
?>
|
2
scripts/init.sql
Normal file
2
scripts/init.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
CREATE TABLE IF NOT EXISTS main.auth (username TEXT, password TEXT);
|
||||
CREATE TABLE IF NOT EXISTS main.token (username TEXT, token TEXT);
|
Loading…
Add table
Add a link
Reference in a new issue