このコミットが含まれているのは:
David 2022-01-31 12:13:28 +09:00
コミット 4819096ae1
3個のファイルの変更1行の追加27行の削除

ファイルの表示

@ -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');
});
});