is_private, is_too_sensitiveにfalseを明示的に指定すると真になってた

This commit is contained in:
shibafu 2020-08-09 11:06:42 +09:00
parent 73c64f0f27
commit 1c6959bfcb

View File

@ -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
]);