card type review

This commit is contained in:
Schneider Roland 2022-12-08 16:25:27 +01:00
parent 0d6b9af52c
commit 9e3efa5ed3

View File

@ -44,11 +44,13 @@ class ActivatedFilter extends ActionFilter
$card = Card::findOne($idCard);
if (isset($card)) {
if (isset($card->type)) {
if ( Card::TYPE_REVIEW === $card->type){
$activated = true;
}
}
}
}
}
// if device is not activated, throw exception with http status 412
if ($activated === false) {
throw new HttpException( HttpStatus::PRECONDITION_FAILED,"Device is not activated: " . $deviceId);