mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 21:44:51 +00:00
Configurations cleanup & database configurations for mail and pdfs (#479)
* Move Mail, PDF configuration to Database, standardize configurations * Set default currency to USD on install * Pint code
This commit is contained in:
committed by
GitHub
parent
3da86965e1
commit
18d63a3375
@@ -18,15 +18,15 @@ class ConfigMiddleware
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (InstallUtils::isDbCreated()) {
|
||||
// Only handle dynamic file disk switching when file_disk_id is provided
|
||||
if ($request->has('file_disk_id')) {
|
||||
$file_disk = FileDisk::find($request->file_disk_id);
|
||||
} else {
|
||||
$file_disk = FileDisk::whereSetAsDefault(true)->first();
|
||||
}
|
||||
|
||||
if ($file_disk) {
|
||||
$file_disk->setConfig();
|
||||
if ($file_disk) {
|
||||
$file_disk->setConfig();
|
||||
}
|
||||
}
|
||||
// Default file disk is now handled by AppConfigProvider during boot
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
||||
Reference in New Issue
Block a user