fix: tweaking recovery after db corruption

This commit is contained in:
2026-01-15 02:20:58 +00:00
parent 8b0f496db3
commit 7767a46e4f
25 changed files with 2844 additions and 4577 deletions

View File

@@ -12,7 +12,8 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
$schedule->command('backup:run --only-db')
->hourlyAt(01);
}
/**

View File

@@ -190,11 +190,12 @@ class ArtworkController extends Controller
public function show(Request $request, $id)
{
$user = auth()->user();
$artwork = Artwork::where('id', $id)
->with('podcast')
->with('episode')
->with('artist')
->first();
$artwork = Artwork::with(['podcast', 'episode', 'artist'])->find($id);
if (!$artwork) {
abort(404);
}
if (is_null($artwork->approved_by) && $user && $user->id != $artwork->id) {
return redirect('artworks');
}