Skip to content

Commit

Permalink
Merge pull request #31 from kyledoesdev/hotfix/save-bug
Browse files Browse the repository at this point in the history
Fix ranking save issue
  • Loading branch information
kyledoesdev authored Oct 13, 2024
2 parents fdd1870 + e4a99de commit 8cab40f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 26 deletions.
5 changes: 2 additions & 3 deletions app/Http/Controllers/SongPlacementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

namespace App\Http\Controllers;

use App\Http\Requests\Song\Placement\StoreSongPlacementRequest;
use App\Http\Requests\Songs\Placement\SongPlacementStoreRequest;
use App\Models\Ranking;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class SongPlacementController extends Controller
{
public function store(StoreSongPlacementRequest $request): JsonResponse
public function store(SongPlacementStoreRequest $request): JsonResponse
{
Ranking::complete(collect($request->songs), $request->rankingId);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace App\Http\Requests\Song\Placement;
namespace App\Http\Requests\Songs\Placement;

use App\Models\Ranking;
use Illuminate\Foundation\Http\FormRequest;

class StoreSongPlacementRequest extends FormRequest
class SongPlacementStoreRequest extends FormRequest
{
public function authorize(): bool
{
Expand Down
2 changes: 1 addition & 1 deletion app/Notifications/EmailBlastNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)->markdown('emails.email-blast', [
'notifiable' => $notifiable
])->subject("Kyle's Song Rank - V 1.2 available now!");
])->subject("Kyle's Song Rank - V 1.3 available now!");
}

/**
Expand Down
21 changes: 2 additions & 19 deletions resources/views/emails/email-blast.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,11 @@
@endif

<p>
This email is to notify you that <a href="{{ env("APP_URL") }}">Song Rank</a> is now at version 1.2!
This email is to notify you that <a href="{{ env("APP_URL") }}">Song Rank</a> is now at version 1.3!
</p>

<p>
In this new version of song rank, I overhauled the entire UI of the
application. Things are going to look familiar and different. I will
continue to make changes over the next few days to fine tune the layouts.
For anyone interested. We switched the application over from using
Twitter Bootstrap to TailwindCSS.
</p>

<p>
I've also added user "profiles". You can now view any users' completed
rankings. You can access a profile by clicking on the "creator" on
any ranking on the explore page. Profiles do not have follows, likes or
comments as of now. Feel free to reach out to me if this is something
you would like added, but I don't plan on adding these for now.
</p>

<p>
The webring has been moved to the about page. If you would like your website to be added
to the webring, let me know!
Hey everyone, we fixed a major bug on song rank that was not allowing you to save your rankings. it should be fixed now. Sorry for the issue!
</p>

<p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/rank/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class="border border-2 border-zinc-800 rounded-lg hover:bg-zinc-100 text-zinc-80
}
function save() {
axios.post('/rank/finish', {
axios.post('/song-placement/store', {
'rankingId': {!! $ranking->getKey() !!},
'songs' : sortedList
})
Expand Down

0 comments on commit 8cab40f

Please sign in to comment.