new database

This commit is contained in:
2021-04-19 09:15:15 +02:00
parent 24663071e6
commit 22a431da07
43 changed files with 423 additions and 302 deletions
+5 -3
View File
@@ -1,13 +1,15 @@
<?php
use Backend\Models\Vote;
require_once "../../../bootstrap.php";
require_once "../Group/Group.php";
if(isLogin()){
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()));
echo json_encode(array('data' => Vote::where('group_id', groupViaToken($_SESSION['token'])->id)->get()->jsonSerialize()));
}else{
} else {
http_response_code(401);
echo json_encode(["message" => "not login"]);
}