feat: ship creator journey v2 and profile updates
This commit is contained in:
@@ -9,6 +9,7 @@ use App\Http\Resources\ArtworkListResource;
|
||||
use App\Models\Artwork;
|
||||
use App\Models\Category;
|
||||
use App\Models\ContentType;
|
||||
use App\Services\ContentTypes\ContentTypeSlugResolver;
|
||||
use App\Services\RankingService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -26,7 +27,10 @@ use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
|
||||
*/
|
||||
class RankController extends Controller
|
||||
{
|
||||
public function __construct(private readonly RankingService $ranking) {}
|
||||
public function __construct(
|
||||
private readonly RankingService $ranking,
|
||||
private readonly ContentTypeSlugResolver $contentTypeResolver,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* GET /api/rank/global
|
||||
@@ -65,7 +69,7 @@ class RankController extends Controller
|
||||
{
|
||||
$ct = is_numeric($contentType)
|
||||
? ContentType::find((int) $contentType)
|
||||
: ContentType::where('slug', $contentType)->first();
|
||||
: $this->contentTypeResolver->resolve($contentType)->contentType;
|
||||
|
||||
if ($ct === null) {
|
||||
return response()->json(['message' => 'Content type not found.'], 404);
|
||||
|
||||
Reference in New Issue
Block a user