Whitespace Nazi.
このコミットが含まれているのは:
コミット
fcf742053c
|
@ -8,18 +8,18 @@ use Illuminate\Support\Facades\Log;
|
|||
|
||||
class CategoryController extends Controller {
|
||||
public function getCategories() { // /api/rpc/category/getcategories
|
||||
return DB::table('str_category')->select('*')->get();
|
||||
return DB::table('str_category')->select('*')->get();
|
||||
}
|
||||
|
||||
public function getCategory($id) { // /api/rpc/category/getcategory/1
|
||||
return DB::table('str_category')->select('*')->where('id', $id)->get();
|
||||
return DB::table('str_category')->select('*')->where('id', $id)->get();
|
||||
}
|
||||
|
||||
public function getCategoryParent($id) { // /api/rpc/category/getcategoryparent/1
|
||||
return DB::table('str_category')->select('parent_id')->where('id', $id)->get();
|
||||
return DB::table('str_category')->select('parent_id')->where('id', $id)->get();
|
||||
}
|
||||
|
||||
public function getCategoryMinScreenshots($id) { // /api/rpc/category/getcategoryminscrot/1
|
||||
return DB::table('str_category')->select('min_screenshots')->where('id', $id)->get();
|
||||
return DB::table('str_category')->select('min_screenshots')->where('id', $id)->get();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,41 +8,41 @@ use Illuminate\Support\Facades\Log;
|
|||
|
||||
class FileController extends Controller {
|
||||
public function getAllFiles() { // /api/rpc/file/getallfiles
|
||||
return DB::table('str_file')->select('*')->get();
|
||||
return DB::table('str_file')->select('*')->get();
|
||||
}
|
||||
|
||||
public function getAllApprovedFiles() { // /api/rpc/file/getallapprovedfiles
|
||||
return DB::table('str_file')->select('*')->where('isApproved', 1)->get();
|
||||
return DB::table('str_file')->select('*')->where('isApproved', 1)->get();
|
||||
}
|
||||
|
||||
public function getAllBrokenFiles() { // /api/rpc/file/getallbrokenfiles
|
||||
return DB::table('str_file')->select('*')->where('isBroken', 1)->get();
|
||||
return DB::table('str_file')->select('*')->where('isBroken', 1)->get();
|
||||
}
|
||||
|
||||
public function getAllPendingFiles() { // /api/rpc/file/getallpendingfiles
|
||||
return DB::table('str_file')->select('*')->where('isApproved', 0)->get();
|
||||
return DB::table('str_file')->select('*')->where('isApproved', 0)->get();
|
||||
}
|
||||
|
||||
public function getNewFiles() { // /api/rpc/file/getnewfiles
|
||||
return DB::table('str_file')
|
||||
->select('id', 'title', 'submit_date')
|
||||
->where('isApproved', 1)
|
||||
->orderBy('submit_date', 'desc')
|
||||
->limit(5)
|
||||
->get();
|
||||
return DB::table('str_file')
|
||||
->select('id', 'title', 'submit_date')
|
||||
->where('isApproved', 1)
|
||||
->orderBy('submit_date', 'desc')
|
||||
->limit(5)
|
||||
->get();
|
||||
}
|
||||
|
||||
public function getHotFiles() { // /api/rpc/file/gethotfiles
|
||||
return DB::table('str_file')
|
||||
->select('id', 'title', 'downloads')
|
||||
->where('isApproved', 1)
|
||||
->orderBy('downloads', 'desc')
|
||||
->limit(5)
|
||||
->get();
|
||||
return DB::table('str_file')
|
||||
->select('id', 'title', 'downloads')
|
||||
->where('isApproved', 1)
|
||||
->orderBy('downloads', 'desc')
|
||||
->limit(5)
|
||||
->get();
|
||||
}
|
||||
|
||||
public function getFile($id) { // /api/rpc/file/getfile/id
|
||||
return DB::table('str_file')->select('*')->where('id', $id)->get();
|
||||
return DB::table('str_file')->select('*')->where('id', $id)->get();
|
||||
}
|
||||
|
||||
public function getFilesInCategory($cat_id) { // /api/rpc/file/getfilesincategory/cat_id
|
||||
|
|
|
@ -8,11 +8,11 @@ use Illuminate\Support\Facades\Log;
|
|||
|
||||
class OwnerController extends Controller {
|
||||
public function getOwners() { // /api/rpc/owner/getowners
|
||||
// $getUsers = DB::table('for_users')->select('id', 'username', 'display_name', 'name_colour', 'group', 'gender', 'avatar');
|
||||
// $getUsers = DB::table('for_users')->select('id', 'username', 'display_name', 'name_colour', 'group', 'gender', 'avatar');
|
||||
return DB::table('str_owners')
|
||||
->select('*')
|
||||
// ->union($getUsers)
|
||||
->get();
|
||||
->select('*')
|
||||
// ->union($getUsers)
|
||||
->get();
|
||||
}
|
||||
|
||||
public function getOwner($id) { // /api/rpc/owner/getowner/id
|
||||
|
|
|
@ -8,34 +8,34 @@ use Illuminate\Support\Facades\Log;
|
|||
|
||||
class PermissionController extends Controller {
|
||||
public function getPermissionsFromModule() { // /api/rpc/permission/getpermissionsfrommodule
|
||||
return DB::table('usr_perm_module')->select('*')->get();
|
||||
return DB::table('usr_perm_module')->select('*')->get();
|
||||
}
|
||||
|
||||
public function getPermissionFromModule($id) { // /api/rpc/permission/getpermissionsfrommodule/id
|
||||
return DB::table('usr_perm_module')->select('*')->where('id', $id)->get();
|
||||
return DB::table('usr_perm_module')->select('*')->where('id', $id)->get();
|
||||
}
|
||||
|
||||
public function getStorePermissions() { // /api/rpc/permission/getstorepermissions
|
||||
return DB::table('str_permissions')->select('*')->get();
|
||||
return DB::table('str_permissions')->select('*')->get();
|
||||
}
|
||||
|
||||
public function getStorePermissionGroup($id) { // /api/rpc/permission/getstorepermissiongroup/id
|
||||
return DB::table('str_permissions')->select('*')->where('id', $id)->get();
|
||||
return DB::table('str_permissions')->select('*')->where('id', $id)->get();
|
||||
}
|
||||
|
||||
public function getStorePermissionUser($id) { // /api/rpc/permission/getstorepermissionuser/id
|
||||
return DB::table('str_user_permissions')->select('*')->where('id', $id)->get();
|
||||
return DB::table('str_user_permissions')->select('*')->where('id', $id)->get();
|
||||
}
|
||||
|
||||
public function getUserPermissions() { // /api/rpc/permission/getuserpermissions
|
||||
return DB::table('usr_permissions')->select('*')->get();
|
||||
return DB::table('usr_permissions')->select('*')->get();
|
||||
}
|
||||
|
||||
public function getUserPermissionGroup($id) { // /api/rpc/permission/getuserpermissiongroup/id
|
||||
return DB::table('usr_permissions')->select('*')->where('id', $id)->get();
|
||||
return DB::table('usr_permissions')->select('*')->where('id', $id)->get();
|
||||
}
|
||||
|
||||
public function getUserPermissionUser($id) { // /api/rpc/permission/getuserpermissionuser/id
|
||||
return DB::table('usr_user_permissions')->select('*')->where('id', $id)->get();
|
||||
return DB::table('usr_user_permissions')->select('*')->where('id', $id)->get();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@ use Illuminate\Support\Facades\Log;
|
|||
|
||||
class UserController extends Controller {
|
||||
public function getUsers() { // /api/rpc/user/getusers
|
||||
return DB::table('for_users')->select('*')->get();
|
||||
return DB::table('for_users')->select('*')->get();
|
||||
}
|
||||
|
||||
public function getUser($id) { // /api/rpc/user/getuser/id
|
||||
return DB::table('for_users')->select('*')->where('id', $id)->get();
|
||||
return DB::table('for_users')->select('*')->where('id', $id)->get();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ header('Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, A
|
|||
|
||||
// FRONTEND
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
return view('home');
|
||||
});
|
||||
|
||||
// BACKEND
|
||||
|
|
新しいイシューから参照