fix

parent 0a7435b9
......@@ -68,8 +68,7 @@ class DefaultController extends BaseController
{
Yii::$app->response->format = Response::FORMAT_JSON;
try
{
try {
list($url, $referer) = Yii::$app->session->get('SessionData');
$url = SessionUrl::find()->where([
......@@ -78,17 +77,15 @@ class DefaultController extends BaseController
'session_id' => Yii::$app->session->get('SessionId')
])->orderBy('created_at DESC')->one();
if($url)
{
if ($url) {
$url->updated_at = time();
$url->save(false, ['updated_at']);
return ['success' => true];
}
return ['success' => false];
}
catch (Exception $e)
{
} catch (Exception $e) {
return ['error' => true];
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment