feat: add static link for latest db dumps (#485)

This commit is contained in:
paranarimasu committed 2022-12-20 23:05:11 -06:00
1 parent a8801edec9
commit b320882d6d
29 files changed
+956 -169

No files matched your search

@@ -4,12 +4,9 @@ declare(strict_types=1);
namespace App\Http\Controllers\Wiki\Video\Script;
use App\Constants\Config\VideoConstants;
use App\Actions\Http\Wiki\Video\Script\ScriptDownloadAction;
use App\Http\Controllers\Controller;
use App\Models\Wiki\Video\VideoScript;
use Illuminate\Filesystem\FilesystemAdapter;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\StreamedResponse;
/**
@@ -25,9 +22,8 @@ class ScriptController extends Controller
*/
public function show(VideoScript $script): StreamedResponse
{
/** @var FilesystemAdapter $fs */
$fs = Storage::disk(Config::get(VideoConstants::SCRIPT_DISK_QUALIFIED));
$action = new ScriptDownloadAction($script);
return $fs->download($script->path);
return $action->download();
}
}