Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Korko
SecretSanta.fr
Commits
3d038a5b
Verified
Commit
3d038a5b
authored
Jan 03, 2021
by
Korko
Browse files
Use DrawCrypt instead of Crypt
parent
58a606c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Console/Commands/SendParticipant.php
View file @
3d038a5b
...
...
@@ -42,7 +42,7 @@ class SendParticipant extends Command
public
function
handle
()
{
$key
=
base64_decode
(
$this
->
argument
(
'key'
));
Crypt
::
setKey
(
$key
);
Draw
Crypt
::
setKey
(
$key
);
$participant
=
Participant
::
find
(
$this
->
argument
(
'participant'
));
...
...
app/Mail/OrganizerRecap.php
View file @
3d038a5b
...
...
@@ -4,7 +4,7 @@ namespace App\Mail;
use
App
;
use
App\Models\Draw
;
use
Crypt
;
use
Draw
Crypt
;
use
Illuminate\Bus\Queueable
;
use
Illuminate\Support\Facades\URL
;
...
...
@@ -14,7 +14,9 @@ class OrganizerRecap extends Mailable
public
$organizerName
;
public
$expirationDate
;
public
$deletionDate
;
public
$panelLink
;
public
$nextSolvable
;
/**
* Create a new message instance.
...
...
@@ -32,7 +34,7 @@ class OrganizerRecap extends Mailable
$this
->
nextSolvable
=
$draw
->
next_solvable
;
$this
->
panelLink
=
URL
::
signedRoute
(
'organizerPanel'
,
[
'draw'
=>
$draw
->
hash
])
.
'#'
.
base64_encode
(
Crypt
::
getKey
());
$this
->
panelLink
=
URL
::
signedRoute
(
'organizerPanel'
,
[
'draw'
=>
$draw
->
hash
])
.
'#'
.
base64_encode
(
Draw
Crypt
::
getKey
());
}
/**
...
...
app/Mail/TargetDrawn.php
View file @
3d038a5b
...
...
@@ -4,7 +4,7 @@ namespace App\Mail;
use
App\Models\Mail
as
MailModel
;
use
App\Models\Participant
;
use
Crypt
;
use
Draw
Crypt
;
use
Illuminate\Bus\Queueable
;
use
Illuminate\Support\Facades\URL
;
...
...
@@ -33,7 +33,7 @@ class TargetDrawn extends TrackedMailable
$this
->
content
=
$this
->
parseKeywords
(
$santa
->
draw
->
mail_body
,
$santa
);
$this
->
dearSantaLink
=
URL
::
signedRoute
(
'dearsanta'
,
[
'participant'
=>
$santa
->
hash
])
.
'#'
.
base64_encode
(
Crypt
::
getKey
());
$this
->
dearSantaLink
=
URL
::
signedRoute
(
'dearsanta'
,
[
'participant'
=>
$santa
->
hash
])
.
'#'
.
base64_encode
(
Draw
Crypt
::
getKey
());
$this
->
track
(
$santa
->
mail
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment