UserSubscription page fix

PaymentMethods page fix
This commit is contained in:
Peter Papp
2020-08-24 09:30:38 +02:00
parent 88315e4a91
commit 9f4c21a1b1
3 changed files with 4 additions and 4 deletions

View File

@@ -85,8 +85,8 @@ class UserController extends Controller
{
$user = User::find($id);
if (! $user->stripeId()) {
return response('User is not stripe customer', 404);
if (! $user->stripeId() || ! $user->subscription('main')) {
return response('User doesn\'t have any subscription.', 404);
}
return new UserSubscription(

File diff suppressed because one or more lines are too long

View File

@@ -15,7 +15,7 @@
</div>
<!--Payment methods table-->
<DatatableWrapper :table-data="{data: PaymentMethods}" :paginator="false" :columns="columns" class="table">
<DatatableWrapper v-if="PaymentMethods" :table-data="{data: PaymentMethods}" :paginator="false" :columns="columns" class="table">
<!--Table data content-->
<template slot-scope="{ row }">