Minor fixes for document downloads
This commit is contained in:
parent
c120dedaa5
commit
5bcbda2f47
|
|
@ -32,9 +32,9 @@ class SetDocumentDb
|
||||||
'errors' => new stdClass,
|
'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);
|
return response()->json($error, 400);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ use App\Models\Client;
|
||||||
use App\Models\ClientContact;
|
use App\Models\ClientContact;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Models\CompanyToken;
|
use App\Models\CompanyToken;
|
||||||
|
use App\Models\Document;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue