Commit
This commit is contained in:
parent
2cfbd9c557
commit
a1d1123894
@ -8,7 +8,7 @@ use \PDOException;
|
||||
|
||||
/**
|
||||
* Encapsulates a single connection to a database.
|
||||
* TODO: add different driver implementations.
|
||||
* TODO: ...
|
||||
*/
|
||||
class Database
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ use App\Teamtable\TeamMapper;
|
||||
use App\Timetable\Time;
|
||||
use App\Timetable\TimeMapper;
|
||||
|
||||
class Cardreader
|
||||
class BatonReader
|
||||
{
|
||||
public PDO $dbh;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// uh oh.. stinky
|
||||
|
||||
$cardreader = $app->model('Cardreader');
|
||||
$batonReader = $app->model('BatonReader');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST')
|
||||
{
|
||||
@ -11,7 +11,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST')
|
||||
$cardnumber = (string)$_POST['cardnumber'];
|
||||
|
||||
try {
|
||||
$code = $cardreader->receive($cardnumber, 5);
|
||||
$code = $batonReader->receive($cardnumber, 5);
|
||||
switch ($code) {
|
||||
case 0:
|
||||
$app->session->flash('Opprettet nytt lag', 'success');
|
||||
|
Reference in New Issue
Block a user