Skip to content

Commit

Permalink
Merge pull request #44 from kyledoesdev/feature/devops
Browse files Browse the repository at this point in the history
devops work
  • Loading branch information
kyledoesdev authored Jan 12, 2025
2 parents 837c66c + 89a9259 commit 885ad2f
Show file tree
Hide file tree
Showing 10 changed files with 1,175 additions and 1,655 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/SpotifyAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function processLogin()
->first();

if (!is_null($deletedUser)) {
Log::channel('discord')->warning($user->email . ' is back from the dead!!!!');
Log::channel('discord')->warning($user->name . ' is back from the dead!!!!');
$deletedUser->restore();
session()->flash('success', "Welcome back {$user->name}.. we've been expecting you.. To revive your rankings - create an issue on our github page. (Link in the footer of the site.)");
}
Expand All @@ -49,7 +49,7 @@ public function processLogin()
$user->preferences()->create(['recieve_reminder_emails' => true]);
}

Log::channel('discord')->warning($user->email . ' just logged in!!');
Log::channel('discord')->warning($user->name . ' just logged in!!');

Auth::login($user);

Expand Down
2 changes: 2 additions & 0 deletions app/Models/Ranking.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;

class Ranking extends Model
Expand Down Expand Up @@ -111,6 +112,7 @@ public static function complete($songs, $id): void

self::find($id)->update(['is_ranked' => true, 'completed_at' => now()]);
Song::upsert($data, ['ranking_id', 'spotify_song_id'], ['title', 'cover', 'rank', 'updated_at']);
Log::channel('discord')->info("{$this->user->name} completed a ranking: {$this->name}.");
}

/* scopes */
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"laravel/tinker": "^2.9",
"maatwebsite/excel": "^3.1",
"marvinlabs/laravel-discord-logger": "^1.4",
"socialiteproviders/spotify": "^4.1",
"spatie/laravel-backup": "^9.1"
"socialiteproviders/spotify": "^4.1"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.10",
Expand Down
Loading

0 comments on commit 885ad2f

Please sign in to comment.