<?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 Vote::where('group_id',groupViaToken($_SESSION['token'])->id)->get()->toJson(JSON_PRETTY_PRINT);

}else{
    http_response_code(401);
}
