Example #1
0
function apiReqsongsList($query)
{
    $channel = channelOrDie($query);
    $reqsongs = dbListReqsongs($channel);
    if ($reqsongs === NULL) {
        tellError("database error", 500);
    }
    $response = array('reqsongs' => $reqsongs);
    tellSuccess($response);
}
Example #2
0
function getReqsongsOrDie($channel)
{
    $reqsongs = dbListReqsongs($channel);
    if ($reqsongs === NULL) {
        respondMessage("database error");
        return NULL;
    } else {
        return $reqsongs;
    }
}