all controllers is aok

This commit is contained in:
2021-03-12 14:05:31 +01:00
parent c6e002d464
commit 91e4d3df00
10 changed files with 68 additions and 43 deletions
+11 -8
View File
@@ -2,19 +2,22 @@
use Backend\Models\Group;
use Backend\Models\Vote;
require "../../../bootstrap.php";
require_once "../../../bootstrap.php";
require_once "Vote.php";
if(isset($_POST['1Vote'])){
require "VoteChecking.php";
if(VoteCheck($_POST['groupId'])){
$vote = new Vote();
$vote->group()->associate(Group::find($_POST['groupId']));
$vote = new Vote();
$vote->group()->associate(Group::find($_POST['groupId']));
$vote->points += 1;
if(!empty($_POST['comment'])){
$vote->comment = $_POST['comment'];
$vote->points += 1;
if(!empty($_POST['comment'])){
$vote->comment = $_POST['comment'];
}
$vote->save();
}
$vote->save();
}