From add35b132e1698523d94595bfd6d196aa53fa880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Wed, 10 Nov 2021 15:45:09 +0900 Subject: [PATCH] sa --- .../Http/Controllers/Api/ChildrenController.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/app/Http/Controllers/Api/ChildrenController.php b/backend/app/Http/Controllers/Api/ChildrenController.php index 894d8b68..7614a5a5 100644 --- a/backend/app/Http/Controllers/Api/ChildrenController.php +++ b/backend/app/Http/Controllers/Api/ChildrenController.php @@ -200,7 +200,8 @@ KIKI承知システムを使って「聞いてない!」「言ってない! ]; try { - // DBに入ります。 + // DBに入る又は変えります。 + TelActivation::where('child_id', $result->id)->delete(); TelActivation::create($create); // SMSを送ります。 @@ -470,12 +471,11 @@ https://kikikan.jp/c-account/forgot-password/reset/'.$token; return ['status_code' => 400, 'error_messages' => ['パスワードの更新に失敗しました。']]; } - // if (isset($r->token)) { - // if (null === ($child_id = TelActivation::select('child_id')->where('token', $r->token)->first())) { - // return ['status_code' => 400, 'error_messages' => ['パスワードの更新に失敗しました。']]; - // } - // $child_id = (int)$child_id->child_id; - // } + if (isset($r->token)) { + if (null === (TelActivation::select('id')->where('token', $r->token)->first())) { + return ['status_code' => 400, 'error_messages' => ['パスワードの更新に失敗しました。']]; + } + } // バリデーションエラー $validate = Validator::make($r->all(), [