ルート
このコミットが含まれているのは:
コミット
80152c6cef
|
@ -319,7 +319,11 @@ https://kikikan.jp/c-account/forgot-password/reset/'.$token;
|
|||
return ['status_code' => 200, 'params' => $params];
|
||||
}
|
||||
|
||||
public function updateImage (Request $r, $child_id) {
|
||||
public function updateImage (Request $r, $child_id=null) {
|
||||
if (isset($r->child_id)) {
|
||||
$child_id = $r->child_id;
|
||||
}
|
||||
|
||||
if (!isset($r->image) || !isset($child_id)) {
|
||||
return ['status_code' => 400, 'error_messages' => ['画像の更新に失敗しました。']];
|
||||
}
|
||||
|
@ -376,7 +380,11 @@ https://kikikan.jp/c-account/forgot-password/reset/'.$token;
|
|||
return ['status_code' => 200, 'success_messages' => ['画像の更新に成功しました。']];
|
||||
}
|
||||
|
||||
public function updateProfile (Request $r, $child_id) {
|
||||
public function updateProfile (Request $r, $child_id=null) {
|
||||
if (isset($r->child_id)) {
|
||||
$child_id = $r->child_id;
|
||||
}
|
||||
|
||||
if (!isset($child_id)) {
|
||||
return ['status_code' => 400, 'error_messages' => ['子の更新に失敗しました。']];
|
||||
}
|
||||
|
@ -416,7 +424,11 @@ https://kikikan.jp/c-account/forgot-password/reset/'.$token;
|
|||
return ['status_code' => 200, 'success_messages' => ['子の更新に成功しました。']];
|
||||
}
|
||||
|
||||
public function updatePassword (Request $r, $child_id) {
|
||||
public function updatePassword (Request $r, $child_id=null) {
|
||||
if (isset($r->child_id)) {
|
||||
$child_id = $r->child_id;
|
||||
}
|
||||
|
||||
if (!isset($child_id)) {
|
||||
return ['status_code' => 400, 'error_messages' => ['画像の更新に失敗しました。']];
|
||||
}
|
||||
|
|
|
@ -239,7 +239,11 @@ class FathersController extends Controller {
|
|||
return ['status_code' => 200, 'params' => $result];
|
||||
}
|
||||
|
||||
public function updateImage (Request $r, $father_id) {
|
||||
public function updateImage (Request $r, $father_id=null) {
|
||||
if (isset($r->father_id)) {
|
||||
$father_id = $r->father_id;
|
||||
}
|
||||
|
||||
if (!isset($r->image) || !isset($father_id)) {
|
||||
return ['status_code' => 400, 'error_messages' => ['親の更新に失敗しました。']];
|
||||
}
|
||||
|
@ -297,7 +301,11 @@ class FathersController extends Controller {
|
|||
return ['status_code' => 200, 'success_messages' => ['親の更新に成功しました。']];
|
||||
}
|
||||
|
||||
public function updateProfile (Request $r, $father_id) {
|
||||
public function updateProfile (Request $r, $father_id=null) {
|
||||
if (isset($r->father_id)) {
|
||||
$father_id = $r->father_id;
|
||||
}
|
||||
|
||||
if (!isset($father_id)) {
|
||||
return ['status_code' => 400, 'error_messages' => ['親の更新に失敗しました。']];
|
||||
}
|
||||
|
@ -334,6 +342,10 @@ class FathersController extends Controller {
|
|||
}
|
||||
|
||||
public function updatePassword (Request $r, $father_id) {
|
||||
if (isset($r->father_id)) {
|
||||
$father_id = $r->father_id;
|
||||
}
|
||||
|
||||
if (!isset($father_id)) {
|
||||
return ['status_code' => 400, 'error_messages' => ['親の更新に失敗しました。']];
|
||||
}
|
||||
|
|
|
@ -80,9 +80,9 @@ Route::group(['prefix' => 'fathers'], function () {
|
|||
Route::post('/login', '\App\Http\Controllers\Api\FathersController@login');
|
||||
|
||||
Route::group(['middleware' => 'auth:fathers'], function () {
|
||||
Route::put('/updateImage/{father_id}', '\App\Http\Controllers\Api\FathersController@updateImage');
|
||||
Route::put('/updateProfile/{father_id}', '\App\Http\Controllers\Api\FathersController@updateProfile');
|
||||
Route::put('/updatePassword/{father_id}', '\App\Http\Controllers\Api\FathersController@updatePassword');
|
||||
Route::put('/updateImage', '\App\Http\Controllers\Api\FathersController@updateImage');
|
||||
Route::put('/updateProfile', '\App\Http\Controllers\Api\FathersController@updateProfile');
|
||||
Route::put('/updatePassword', '\App\Http\Controllers\Api\FathersController@updatePassword');
|
||||
Route::delete('/withdrawal', '\App\Http\Controllers\Api\FathersController@withdrawal');
|
||||
|
||||
// ChildrenController
|
||||
|
@ -144,9 +144,9 @@ Route::group(['prefix' => 'children'], function () {
|
|||
|
||||
Route::group(['middleware' => 'auth:children'], function () {
|
||||
Route::get('/detail/{child_id}', '\App\Http\Controllers\Api\ChildrenController@detail');
|
||||
Route::put('/updateImage/{child_id}', '\App\Http\Controllers\Api\ChildrenController@updateImage');
|
||||
Route::put('/updateProfile/{child_id}', '\App\Http\Controllers\Api\ChildrenController@updateProfile');
|
||||
Route::put('/updatePassword/{child_id}', '\App\Http\Controllers\Api\ChildrenController@updatePassword');
|
||||
Route::put('/updateImage', '\App\Http\Controllers\Api\ChildrenController@updateImage');
|
||||
Route::put('/updateProfile', '\App\Http\Controllers\Api\ChildrenController@updateProfile');
|
||||
Route::put('/updatePassword', '\App\Http\Controllers\Api\ChildrenController@updatePassword');
|
||||
Route::delete('/withdrawal', '\App\Http\Controllers\Api\ChildrenController@withdrawal');
|
||||
|
||||
// FathersController
|
||||
|
|
新しいイシューから参照