mobileapi - do not display virtual key, which are already out

This commit is contained in:
Schneider Roland 2023-01-18 19:32:22 +01:00
parent 969f38bc2a
commit 06492f7d03

View File

@ -104,6 +104,10 @@ class ApiManager
throw new NotFoundHttpException(); throw new NotFoundHttpException();
} }
if (isset($virtualKey->direction_out_at )){
throw new NotFoundHttpException("Already out");
}
$key = Key::findOne(['id_key' => $virtualKey->id_key]); $key = Key::findOne(['id_key' => $virtualKey->id_key]);
if (!isset($key)) { if (!isset($key)) {
throw new NotFoundHttpException(); throw new NotFoundHttpException();