fix (be podcast): trying to retreive file and podcast data to update third party track references and celery tasks tables

This commit is contained in:
Marco Cavalli 2025-07-10 18:06:52 +02:00
parent bcf9b5c5a7
commit 222b1d2d7b
4 changed files with 58 additions and 21 deletions

View file

@ -10,6 +10,7 @@ use App\Models\TrackType;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
class FileController extends Controller
@ -57,7 +58,11 @@ class FileController extends Controller
throw new \Exception("You must be logged in");
}
//ToDo: check how to work in Legacy, getting user in this way is quite horrible
$user = User::where('type','=','P')->orderBy('id','ASC')->first();
try {
$user = User::where('type','=','P')->orderBy('id','ASC')->first();
} catch (\Exception $e) {
Log::error($e->getMessage());
}
}
//Mime type list: https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types