Update
This commit is contained in:
@@ -34,10 +34,11 @@ public function handle()
|
|||||||
|
|
||||||
if ($expiredTokens->isEmpty()) {
|
if ($expiredTokens->isEmpty()) {
|
||||||
$this->info('No expired tokens found.');
|
$this->info('No expired tokens found.');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->info('Found ' . $expiredTokens->count() . ' expired tokens to process.');
|
$this->info('Found '.$expiredTokens->count().' expired tokens to process.');
|
||||||
|
|
||||||
$restoredCredits = 0;
|
$restoredCredits = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public function premiumExportComplete(Request $request)
|
|||||||
->where('user_id', $user->id)
|
->where('user_id', $user->id)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if (!$token) {
|
if (! $token) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'error' => [
|
'error' => [
|
||||||
'message' => 'Invalid export token.',
|
'message' => 'Invalid export token.',
|
||||||
@@ -70,7 +70,7 @@ public function premiumExportComplete(Request $request)
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$token->isValid()) {
|
if (! $token->isValid()) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'error' => [
|
'error' => [
|
||||||
'message' => 'Export token has expired or already been used.',
|
'message' => 'Export token has expired or already been used.',
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ public function isExpired(): bool
|
|||||||
|
|
||||||
public function isUsed(): bool
|
public function isUsed(): bool
|
||||||
{
|
{
|
||||||
return !is_null($this->used_at);
|
return ! is_null($this->used_at);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isValid(): bool
|
public function isValid(): bool
|
||||||
{
|
{
|
||||||
return !$this->isExpired() && !$this->isUsed();
|
return ! $this->isExpired() && ! $this->isUsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function markAsUsed(): void
|
public function markAsUsed(): void
|
||||||
@@ -53,7 +53,7 @@ public function markAsUsed(): void
|
|||||||
public function scopeExpiredAndUnused($query)
|
public function scopeExpiredAndUnused($query)
|
||||||
{
|
{
|
||||||
return $query->where('expires_at', '<', now())
|
return $query->where('expires_at', '<', now())
|
||||||
->whereNull('used_at');
|
->whereNull('used_at');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeForUser($query, $userId)
|
public function scopeForUser($query, $userId)
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ @theme {
|
|||||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||||
--color-sidebar-border: var(--sidebar-border);
|
--color-sidebar-border: var(--sidebar-border);
|
||||||
--color-sidebar-ring: var(--sidebar-ring);
|
--color-sidebar-ring: var(--sidebar-ring);
|
||||||
|
|
||||||
|
--spacing-safe-area: env(safe-area-inset-top);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ const UpgradeSheet = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Sheet open={isOpen} onOpenChange={handleOpenChange}>
|
<Sheet open={isOpen} onOpenChange={handleOpenChange}>
|
||||||
<SheetContent side="bottom" className="max-h-screen overflow-y-scroll pb-1">
|
<SheetContent side="bottom" className="max-h-screen gap-0! overflow-y-scroll pb-1 pt-safe-area">
|
||||||
<SheetHeader>
|
<SheetHeader className="mb-0">
|
||||||
<SheetTitle className="flex items-center justify-center gap-2 sm:text-center">
|
<SheetTitle className="flex items-center justify-center gap-2 sm:text-center">
|
||||||
<CartIcon className={'h-4 w-4'} /> Store
|
<CartIcon className={'h-4 w-4'} /> Store
|
||||||
</SheetTitle>
|
</SheetTitle>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user