add card type : review
This commit is contained in:
parent
5a705f15b0
commit
0371b6e3ee
@ -40,6 +40,7 @@ class ActivatedFilter extends ActionFilter
|
||||
// find out if the device is activated
|
||||
$activated = $mobileDevice->status === MobileDevice::STATUS_ACTIVE;
|
||||
// override activated to true, if it is a reviewer card
|
||||
if (isset($idCard)) {
|
||||
$card = Card::findOne($idCard);
|
||||
if (isset($card)) {
|
||||
if (isset($card->type)) {
|
||||
@ -47,6 +48,7 @@ class ActivatedFilter extends ActionFilter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user