Skip to content

Commit

Permalink
cachethq#3102 fix redirects when adding subscribers/verifying them
Browse files Browse the repository at this point in the history
  • Loading branch information
Naugrimm committed Jan 26, 2020
1 parent 4e7aaef commit cb14f44
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/Http/Controllers/SubscribeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ public function postSubscribe()
// Send the subscriber a link to manage their subscription.
$subscription->notify(new ManageSubscriptionNotification());

return redirect()->back()->withSuccess(
sprintf('%s %s', trans('dashboard.notifications.awesome'),
trans('cachet.subscriber.email.manage_subscription')));
return cachet_redirect('status-page')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed')));
}

/**
Expand All @@ -122,8 +121,8 @@ public function getVerify($code = null)
execute(new VerifySubscriberCommand($subscriber));
}

return redirect()->to(URL::signedRoute(cachet_route_generator('subscribe.manage'), ['code' => $code]))
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed')));
return cachet_redirect('subscribe.manage', ['code' => $subscriber->verify_code])
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.verified')));
}

/**
Expand Down

0 comments on commit cb14f44

Please sign in to comment.