update
This commit is contained in:
@@ -35,4 +35,14 @@ class ApiController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function actionSyncUrl() {
|
||||
if (Yii::$app->request->post()) {
|
||||
$post = Yii::$app->request->bodyParams;
|
||||
$model = new \app\models\FaceLogs();
|
||||
$model->create($post);
|
||||
Yii::$app->response->format = "json";
|
||||
return ["stt" => true];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,9 @@ class DashboardController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (Yii::$app->user->isGuest) {
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user