30 lines
688 B
PHP
30 lines
688 B
PHP
|
<?php
|
||
|
session_start();
|
||
|
require_once(__DIR__ . "/services/apiBranch.inc.php");
|
||
|
require_once(__DIR__ . "/services/jsonBuilder.inc.php");
|
||
|
require_once(__DIR__ . "/services/responses.inc.php");
|
||
|
require_once(__DIR__ . "/services/jugglDbApi.inc.php");
|
||
|
|
||
|
class GetRunningRecordsBranch extends ApiBranch
|
||
|
{
|
||
|
function get(ParamCleaner $params)
|
||
|
{
|
||
|
respondStatus(405);
|
||
|
}
|
||
|
|
||
|
function post(ParamCleaner $params)
|
||
|
{
|
||
|
$user_id = $params->get("user_id");
|
||
|
|
||
|
$records = getRunningRecords($user_id);
|
||
|
|
||
|
$json = new JsonBuilder();
|
||
|
$json->addRecords($records);
|
||
|
|
||
|
respondJson($json);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$branch = new GetRunningRecordsBranch();
|
||
|
$branch->execute();
|