13 lines
351 B
PHP
13 lines
351 B
PHP
<?php
|
|
use Backend\Models\Vote;
|
|
require_once "../../../bootstrap.php";
|
|
require_once "../Group/Group.php";
|
|
|
|
if(isLogin()){
|
|
header('Content-Type: application/json;charset=UTF-8');
|
|
echo json_encode(array('data' => Vote::where('group_id',groupViaToken($_SESSION['token'])->id)->get()->jsonSerialize()));
|
|
|
|
}else{
|
|
echo http_response_code(401);
|
|
}
|