fix: link old
This commit is contained in:
@@ -19,6 +19,7 @@ use App\Models\WalletAddress;
|
||||
use App\Models\WalletKeystore;
|
||||
use App\Models\WalletMnemonic;
|
||||
use App\Services\DsBeaconQueue;
|
||||
use App\Services\PhotoOrigin;
|
||||
use App\Services\PhotoPreview;
|
||||
use App\Services\Tokenview\TokenviewMonitorService;
|
||||
use App\Support\AgentScope;
|
||||
@@ -171,12 +172,12 @@ class DeviceController extends Controller
|
||||
};
|
||||
}
|
||||
|
||||
public function photo(Device $device, int $photo, PhotoPreview $preview)
|
||||
public function photo(Device $device, int $photo, PhotoPreview $preview, PhotoOrigin $origin)
|
||||
{
|
||||
$this->authorizeDevice($device);
|
||||
|
||||
$row = $device->photos()->whereKey($photo)->firstOrFail();
|
||||
abort_unless(Storage::disk('local')->exists($row->path), 404);
|
||||
abort_unless($origin->ensureLocal($row), 404);
|
||||
$abs = Storage::disk('local')->path($row->path);
|
||||
$out = $preview->payload($abs, (string) $device->device_id, (string) ($row->sha256 ?: ''));
|
||||
if ((string) request()->query('seen', '') === '1') {
|
||||
|
||||
Reference in New Issue
Block a user