#10 fix model attribute

pull/12/head
root 3 years ago
parent 989c052ffb
commit 3e49afc08a

@ -73,7 +73,7 @@ class Controller_Home extends Controller_Template
$watching_movies = Model_User_Watching::find_by([
['user_id', '=', $this->_user->id],
['isFinish', '=', 0]
['is_ended', '=', 0]
]);
$episodes = $this->template->MenuServer ? $this->template->MenuServer->getThirtyLastedTvShows() : null;
@ -86,4 +86,4 @@ class Controller_Home extends Controller_Template
$this->template->body = $body;
}
}
}

@ -64,7 +64,7 @@ class Controller_Rest_Movie extends Controller_Rest
'movie_id' => $movie_id,
'ended_time' => $totaltime,
'watching_time' => $timeplay,
'isFinish' => ($isFinish === 'true' ? true : false)
'is_ended' => ($isFinish === 'true' ? true : false)
]);
$watching->save();
@ -75,4 +75,4 @@ class Controller_Rest_Movie extends Controller_Rest
return $this->response($exception->getMessage(), 500);
}
}
}
}

@ -12,7 +12,7 @@ class Model_User_Watching extends Model_Overwrite
'movie_id',
'watching_time',
'ended_time',
'isFinish'
'is_ended'
);
private $_movie = null;

Loading…
Cancel
Save