From d10c41e8f98011b242b150693f3396ddf906fb65 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: Tue, 30 Nov 2021 15:14:30 +0900 Subject: [PATCH 1/3] validatePdfSizePdfMemePdfSizePdfMemePdfSizePdfMeme --- .../Controllers/Api/MeetingsController.php | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/backend/app/Http/Controllers/Api/MeetingsController.php b/backend/app/Http/Controllers/Api/MeetingsController.php index 51e39ddf..ca66e9a2 100644 --- a/backend/app/Http/Controllers/Api/MeetingsController.php +++ b/backend/app/Http/Controllers/Api/MeetingsController.php @@ -736,7 +736,7 @@ class MeetingsController extends Controller { 'title' => 'required|max:100', 'text' => 'required|max:2000', 'memo' => 'nullable|max:2000', - 'pdf' => 'pdf_size_pdf_meme', + 'pdf' => 'pdf_size|pdf_meme', ]); if ($validate->fails()) { @@ -808,8 +808,27 @@ class MeetingsController extends Controller { } public function delete ($meeting_id) { + $delimg = false; + if (!isset($meeting_id)) { + return ['status_code' => 400]; + } + + if (null === ($get = Meetings::select('pdf')->where('id', (int)$meeting_id)->get())) { + return ['status_code' => 400]; + } + + if (null !== ($img = MeetingImage::select('image')->where('meeting_id', (int)$meeting_id)->get())) { + $delimg = true; + } + try { Meeting::where('id', (int)$meeting_id)->delete(); + Storage::disk('private')->delete($get->pdf); + if ($delimg) { + foreach ($img as $m) { + Storage::disk('private')->delete($m->image); + } + } } catch (\Throwable $e) { Log::critical($e->getMessage()); return ['status_code' => 400]; From ce8f21b676ee3c8c7a09fa0a82e5b1cf607e89b8 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: Tue, 30 Nov 2021 15:19:37 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BB=AE=E7=99=BB=E9=8C=B2=E3=83=A1?= =?UTF-8?q?=E3=83=BC=E3=83=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mail/FathersRegistrationTemporaryMail.php | 2 +- .../fathers/registration/temporary.blade.php | 25 ++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/backend/app/Mail/FathersRegistrationTemporaryMail.php b/backend/app/Mail/FathersRegistrationTemporaryMail.php index 349ca71a..5a12c259 100644 --- a/backend/app/Mail/FathersRegistrationTemporaryMail.php +++ b/backend/app/Mail/FathersRegistrationTemporaryMail.php @@ -16,7 +16,7 @@ class FathersRegistrationTemporaryMail extends Mailable { } public function build () { - return $this->subject('仮登録が完了しました。')->markdown('emails.fathers.registration.temporary', [ + return $this->subject('【KIKIkan】会員登録のご案内')->markdown('emails.fathers.registration.temporary', [ 'token' => $this->token ]); } diff --git a/backend/resources/views/emails/fathers/registration/temporary.blade.php b/backend/resources/views/emails/fathers/registration/temporary.blade.php index 400f680a..8f33c9d9 100644 --- a/backend/resources/views/emails/fathers/registration/temporary.blade.php +++ b/backend/resources/views/emails/fathers/registration/temporary.blade.php @@ -1,11 +1,30 @@ @component('mail::message') -# 仮登録が完了しました。 +# 【KIKIkan】会員登録のご案内 -サイトへのアカウント仮登録が完了しました。 +KIKIkanサービスの会員登録のご案内です。 -以下のリンクからログインして、本登録を完了させてください。 +KIKIkanシステムのご利用ありがとうございます。 + +※本登録完了後にホーム画面もしくはブックマークに登録してください。 +ログインする際に利用します。 + +下記URLにアクセスし、必要情報をご入力頂き +ユーザー登録を完了してください。 @component('mail::button', ['url' => url('/').'/p-account/register/'.$token]) {{ url('/') }}/p-account/register/{{ $token }} @endcomponent + +なお、URLの有効期限は8時間となります。 +URLの有効期限を過ぎると、再登録が必要になりますので、ご注意ください。 + +※このメールに心当たりがない場合は下記のメールにご連絡ください。 + +■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□■ + +KIKIkan運営事務局 +56@zotman.jp +{{ url('/') }}/ + +■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□■ @endcomponent From 1c93da960cd32b20ca719344da967c7a1c845324 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: Tue, 30 Nov 2021 15:24:14 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B?= =?UTF-8?q?=E5=A0=B4=E5=90=88=E3=80=81=E7=94=BB=E5=83=8F=E3=82=92=E3=82=A2?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=83=AD=E3=83=BC=E3=83=89=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E3=82=89=E5=89=8A=E9=99=A4=E3=81=97=E3=81=BE=E3=81=99?= =?UTF-8?q?=E3=80=82=E3=81=AA=E3=81=91=E3=82=8C=E3=81=B0=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=81=AF=E4=B8=8D=E8=A6=81=E3=81=A7=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/Http/Controllers/Api/ChildrenController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/Http/Controllers/Api/ChildrenController.php b/backend/app/Http/Controllers/Api/ChildrenController.php index 25299647..64e2c098 100644 --- a/backend/app/Http/Controllers/Api/ChildrenController.php +++ b/backend/app/Http/Controllers/Api/ChildrenController.php @@ -176,7 +176,7 @@ class ChildrenController extends Controller { // 失敗 Log::critical($e->getMessage()); DB::rollback(); - Storage::disk('private')->delete($filename); + if (!is_null($r->image)) Storage::disk('private')->delete($filename); return ['status_code' => 400, 'error_messages' => ['登録に失敗しました。']]; }