Moves newsletter hash generating logic into Security helper class

Updates Links class to use Security helper's hash generating method
This commit is contained in:
Vlad
2017-05-14 17:54:53 -04:00
parent a3e8d47199
commit 6e700b0cfa
6 changed files with 32 additions and 17 deletions

View File

@@ -49,7 +49,9 @@ class Track {
Newsletter::findOne($data->queue->newsletter_id) :
false;
if(!empty($data->link_hash)) {
$data->link = NewsletterLink::getByHash($data->link_hash);
$data->link = NewsletterLink::where('queue_id', $data->queue_id)
->where('hash', $data->link_hash)
->findOne();
}
return $this->_validateTrackData($data);
}