<?php

use App\Http\Controllers\MediaController;
use Illuminate\Support\Facades\Route;

Route::get('/profile-media/pending', [MediaController::class, 'pendingProfiles'])->middleware('permission:config.media,view');

Route::patch('/profile-media/{source}/{sourceId}/approve', [MediaController::class, 'approveProfile'])->middleware('permission:config.media,edit');

Route::get('/media',         [MediaController::class, 'index'])->middleware('permission:config.media,view');
Route::post('/media',        [MediaController::class, 'store'])->middleware('permission:config.media,add');
Route::get('/media/{id}',    [MediaController::class, 'show'])->middleware('permission:config.media,view');
Route::put('/media/{id}',    [MediaController::class, 'update'])->middleware('permission:config.media,edit');
Route::delete('/media/{id}', [MediaController::class, 'destroy'])->middleware('permission:config.media,delete');
