Corrected upload call, and added mkdir commands to it.
このコミットが含まれているのは:
コミット
30536385f1
|
@ -439,27 +439,38 @@ class StoreController extends Controller {
|
|||
}
|
||||
|
||||
public function uploadEntry(Request $request) { // /api/rpc/store/entry/upload
|
||||
return DB::table('str_file')
|
||||
if (!mkdir('assets/store/'.$request->id, 0755, true)) {
|
||||
$error = $error = error_get_last();
|
||||
exit();
|
||||
}
|
||||
if (!mkdir('assets/store/'.$request->id.'/screens', 0755, true)) {
|
||||
$error = $error = error_get_last();
|
||||
exit();
|
||||
}
|
||||
|
||||
$add = DB::table('str_file')
|
||||
->insert([
|
||||
'game_id' => $request->game_id,
|
||||
'cat_id' => $request->cat_id,
|
||||
'game_id' => intval($request->game_id),
|
||||
'cat_id' => intval($request->cat_id),
|
||||
'title' => $request->title,
|
||||
'version' => $request->version,
|
||||
'video' => $request->video,
|
||||
'video' => (!empty($request->video) ? $request->video : ''),
|
||||
'description' => $request->description,
|
||||
'changelog' => '',
|
||||
'warningnote' => $request->warningnote,
|
||||
'submit_date' => $request->submit_date,
|
||||
'last_date' => 0,
|
||||
'views' => 0,
|
||||
'downloads' => 0,
|
||||
'isApproved' => 1,
|
||||
'isBroken' => 0,
|
||||
'warningnote' => (!empty($request->warningnote) ? $request->warningnote : ''),
|
||||
'submit_date' => intval($request->submit_date),
|
||||
'last_date' => intval(0),
|
||||
'views' => intval(0),
|
||||
'downloads' => intval(0),
|
||||
'isApproved' => intval(1),
|
||||
'isBroken' => intval(0),
|
||||
'failreason' => '',
|
||||
'breakreason' => '',
|
||||
'approveignore' => 0,
|
||||
'brokenignore' => 0
|
||||
'approveignore' => intval(0),
|
||||
'brokenignore' => intval(0)
|
||||
]);
|
||||
|
||||
return \Response::json($add);
|
||||
}
|
||||
|
||||
public function updateEntry(Request $request) { // /api/rpc/store/entry/update
|
||||
|
|
新しいイシューから参照