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