Added versions to hot and new entry APIs.

このコミットが含まれているのは:
テクニカル諏訪子 2018-02-01 18:29:19 +09:00
コミット 85329330c7
1個のファイルの変更12行の追加2行の削除

ファイルの表示

@ -36,7 +36,12 @@ class FileController extends Controller {
public function getNewFiles() { // /api/rpc/file/getnewfiles
return DB::table('str_file')
->select('id', 'title', 'submit_date')
->select(
'id',
'title',
'version',
'submit_date'
)
->where('isApproved', 1)
->orderBy('submit_date', 'desc')
->limit(5)
@ -45,7 +50,12 @@ class FileController extends Controller {
public function getHotFiles() { // /api/rpc/file/gethotfiles
return DB::table('str_file')
->select('id', 'title', 'downloads')
->select(
'id',
'title',
'version',
'downloads'
)
->where('isApproved', 1)
->orderBy('downloads', 'desc')
->limit(5)