mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Minor fixes for document downloads
This commit is contained in:
parent
c120dedaa5
commit
5bcbda2f47
@ -32,9 +32,9 @@ class SetDocumentDb
|
||||
'errors' => new stdClass,
|
||||
];
|
||||
|
||||
if ($request->has('document_hash') && config('ninja.db.multi_db_enabled')) {
|
||||
if (config('ninja.db.multi_db_enabled')) {
|
||||
|
||||
if (! MultiDB::documentFindAndSetDb($request->input('document_hash')))
|
||||
if (! MultiDB::documentFindAndSetDb($request->segment(2)))
|
||||
return response()->json($error, 400);
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ use App\Models\Client;
|
||||
use App\Models\ClientContact;
|
||||
use App\Models\Company;
|
||||
use App\Models\CompanyToken;
|
||||
use App\Models\Document;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
|
Loading…
Reference in New Issue
Block a user