Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ MAIL_ENCRYPTION=null

STRIPE_KEY=
STRIPE_SECRET=
STRIPE_MODEL=App\User
STRIPE_MODEL=App\Models\Users\User
MIX_STRIPE_KEY=
MIX_STRIPE_PUBLIC_KEY=

CASHIER_MODEL=App\User
CASHIER_MODEL=App\Models\Users\User
CASHIER_CURRENCY=eur

AWS_KEY=homestead
Expand Down Expand Up @@ -90,6 +90,10 @@ VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"

SENTRY_LARAVEL_DSN=
SENTRY_TRACES_SAMPLE_RATE=0
SENTRY_SEND_DEFAULT_PII=false

OPTIMIZE="true"
NETWORK=preprod
NETWORK_PARAMS_FILE="preprod.json"
Expand Down
11 changes: 7 additions & 4 deletions app/Listeners/Littercoin/RewardLittercoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use App\Models\Photo;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Facades\DB;
use App\Services\Redis\RedisKeys;
use Illuminate\Support\Facades\Redis;

Expand All @@ -29,10 +30,12 @@ public function handle (TagsVerifiedByAdmin $event)

if ($count === 100)
{
Littercoin::firstOrCreate([
'user_id' => $event->user_id,
'photo_id' => $event->photo_id
]);
DB::transaction(function () use ($event) {
Littercoin::firstOrCreate([
'user_id' => $event->user_id,
'photo_id' => $event->photo_id
]);
}, 3);

// Broadcast an event to anyone viewing the global map
event(new LittercoinMined($event->user_id, '100-images-verified'));
Expand Down
3 changes: 3 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
use Laravel\Cashier\Cashier;

class AppServiceProvider extends ServiceProvider
{
Expand Down Expand Up @@ -41,6 +42,8 @@ public function boot()

Photo::observe(PhotoObserver::class);

Cashier::useCustomerModel(User::class);

Gate::define('viewPulse', function (User $user) {
return $user->hasRole('superadmin');
});
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"maatwebsite/excel": "^3.1",
"openai-php/client": "^0.10.3",
"pusher/pusher-php-server": "^7.0",
"sentry/sentry-laravel": "^4.24",
"spatie/browsershot": "^4.3",
"spatie/emoji": "^4.0",
"spatie/laravel-backup": "^8.0",
Expand Down
Loading
Loading