new class Ssettings to get videopath from db

add test - failing
remove useless videopath and tvpath from app.js
This commit is contained in:
2020-07-15 20:08:22 +02:00
parent 5662a6e6e5
commit b9b9ac0bc2
4 changed files with 72 additions and 15 deletions

22
api/SSettings.php Normal file
View File

@ -0,0 +1,22 @@
<?php
class SSettings
{
private $database;
/**
* SSettings constructor.
*/
public function __construct() {
$this->database = Database::getInstance();
}
public function getVideoPath() {
$query = "SELECT video_path from settings";
$result = $this->database->getConnection()->query($query);
$r = mysqli_fetch_assoc($result);
return $r['video_path'];
}
}