updates
このコミットが含まれているのは:
コミット
4819096ae1
|
@ -37,14 +37,6 @@ class FatherRelationsController extends Controller {
|
|||
return ['status_code' => 200];
|
||||
}
|
||||
|
||||
public function checkFromChildren (Request $r) {
|
||||
$father_id = request()->route()->action['as'] == 'chk_parent' ? (int)session()->get('fathers')['id'] : (int)$r->father_id;
|
||||
|
||||
$father = Father::select('relation_limit')->where('id', $father_id)->first();
|
||||
|
||||
return ['status_code' => 200];
|
||||
}
|
||||
|
||||
public function register (Request $r) {
|
||||
if (!isset($r->father_id)) {
|
||||
return ['status_code' => 400, 'error_messages' => ['子の追加に失敗しました。']];
|
||||
|
|
|
@ -19,25 +19,8 @@ const ChildSignUpTemporary = () => {
|
|||
|
||||
useEffect(() => {
|
||||
isMountedRef.current = false;
|
||||
setLoaded(false);
|
||||
setLoaded(true);
|
||||
|
||||
if(document.getElementById('father_token')){
|
||||
let father_id = document.getElementById('father_token').value;
|
||||
axios.get('/api/children/father/relations/check', {params:{father_id: father_id}})
|
||||
.then(response=>{
|
||||
if(isMountedRef.current) return;
|
||||
|
||||
if(response.data.status_code == 200){
|
||||
setLoaded(true);
|
||||
}
|
||||
else{
|
||||
navigator('/c-account/login');
|
||||
}
|
||||
})
|
||||
}
|
||||
else{
|
||||
setLoaded(true);
|
||||
}
|
||||
return () => {
|
||||
isMountedRef.current = true;
|
||||
}
|
||||
|
|
|
@ -168,7 +168,6 @@ Route::group(['prefix' => 'children'], function () {
|
|||
Route::group(['prefix' => 'father'], function () {
|
||||
Route::group(['prefix' => 'relations'], function () {
|
||||
Route::get('/checkNull', '\App\Http\Controllers\Api\FatherRelationsController@checkNull')->name('chknull_child');
|
||||
Route::get('/check', '\App\Http\Controllers\Api\FatherRelationsController@checkFromChildren')->name('chk_child');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
新しいイシューから参照