Skip to content

Commit

Permalink
Fixed forced T-tag when training is in queue (rest)
Browse files Browse the repository at this point in the history
  • Loading branch information
blt950 committed Jan 1, 2023
1 parent 14430e1 commit a623a0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/API/BookingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function store(Request $request)
} else if(($booking->position->rating > $user->rating) && !$user->isModeratorOrAbove()){
$booking->training = 1;
$forcedTrainingTag = true;
} else if($booking->position->mae && $user->getActiveTraining() && $user->getActiveTraining()->isMaeTraining() && $booking->position->rating == $user->rating) {
} else if($booking->position->mae && $user->getActiveTraining(1) && $user->getActiveTraining(1)->isMaeTraining() && $booking->position->rating == $user->rating) {
$booking->training = 1;
$forcedTrainingTag = true;
} else {
Expand Down Expand Up @@ -273,7 +273,7 @@ public function update(Request $request, booking $booking)
} else if(($booking->position->rating > $user->rating) && !$user->isModeratorOrAbove()){
$booking->training = 1;
$forcedTrainingTag = true;
} else if($booking->position->mae && $user->getActiveTraining() && $user->getActiveTraining()->isMaeTraining() && $booking->position->rating == $user->rating) {
} else if($booking->position->mae && $user->getActiveTraining(1) && $user->getActiveTraining(1)->isMaeTraining() && $booking->position->rating == $user->rating) {
$booking->training = 1;
$forcedTrainingTag = true;
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/BookingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public function update(Request $request)
} else if(($booking->position->rating > $bookingUser->rating) && !$bookingUser->isModeratorOrAbove()){
$booking->training = 1;
$forcedTrainingTag = true;
} else if($booking->position->mae && $bookingUser->getActiveTraining() && $bookingUser->getActiveTraining()->isMaeTraining() && $booking->position->rating == $bookingUser->rating) {
} else if($booking->position->mae && $bookingUser->getActiveTraining(1) && $bookingUser->getActiveTraining(1)->isMaeTraining() && $booking->position->rating == $bookingUser->rating) {
$booking->training = 1;
$forcedTrainingTag = true;
} else {
Expand Down

0 comments on commit a623a0b

Please sign in to comment.