From 1c6959bfcb8423a646a879d314154722a5fbb46f Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 9 Aug 2020 11:06:42 +0900 Subject: [PATCH] =?UTF-8?q?is=5Fprivate,=20is=5Ftoo=5Fsensitive=E3=81=ABfa?= =?UTF-8?q?lse=E3=82=92=E6=98=8E=E7=A4=BA=E7=9A=84=E3=81=AB=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E3=81=99=E3=82=8B=E3=81=A8=E7=9C=9F=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/WebhookController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Api/WebhookController.php b/app/Http/Controllers/Api/WebhookController.php index e4d9c42..0573c62 100644 --- a/app/Http/Controllers/Api/WebhookController.php +++ b/app/Http/Controllers/Api/WebhookController.php @@ -62,15 +62,15 @@ class WebhookController extends Controller ], 422); } - $ejaculation = DB::transaction(function () use ($request, $inputs, $webhook, $ejaculatedDate) { + $ejaculation = DB::transaction(function () use ($inputs, $webhook, $ejaculatedDate) { $ejaculation = Ejaculation::create([ 'user_id' => $webhook->user_id, 'ejaculated_date' => $ejaculatedDate, 'note' => $inputs['note'] ?? '', 'link' => $inputs['link'] ?? '', 'source' => Ejaculation::SOURCE_WEBHOOK, - 'is_private' => $request->has('is_private') ?? false, - 'is_too_sensitive' => $request->has('is_too_sensitive') ?? false, + 'is_private' => (bool)($inputs['is_private'] ?? false), + 'is_too_sensitive' => (bool)($inputs['is_too_sensitive'] ?? false), 'checkin_webhook_id' => $webhook->id ]);