mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
fix auth
This commit is contained in:
parent
287161392d
commit
48c059b3db
@ -352,4 +352,11 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function authControl()
|
||||
{
|
||||
if (!Auth::user()) {
|
||||
redirect('/login?redirect=' . url()->current())->send();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,7 +163,6 @@ class AdvsController extends PublicController
|
||||
|
||||
foreach ($featured_advs as $index => $ad) {
|
||||
$featured_advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list');
|
||||
$featured_advs[$index]->price = number_format($ad->price);
|
||||
$featured_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user