mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Add in constrained queries
This commit is contained in:
parent
7bc1bc5206
commit
deb55dd6c8
@ -343,7 +343,7 @@ class LoginController extends BaseController
|
||||
}
|
||||
});
|
||||
|
||||
return $this->listResponse($cu);
|
||||
return $this->timeConstrainedResponse($cu);
|
||||
|
||||
}
|
||||
}
|
||||
@ -384,7 +384,7 @@ class LoginController extends BaseController
|
||||
}
|
||||
});
|
||||
|
||||
return $this->listResponse($cu);
|
||||
return $this->timeConstrainedResponse($cu);
|
||||
}
|
||||
|
||||
return response()
|
||||
|
@ -219,7 +219,7 @@ class BaseController extends Controller
|
||||
|
||||
},
|
||||
'company.company_gateways' => function ($query) use ($user) {
|
||||
$query->whereNotNull('updated_at');
|
||||
$query->whereNotNull('updated_at')->with('gateway');
|
||||
|
||||
if(!$user->isAdmin())
|
||||
$query->where('company_gateways.user_id', $user->id);
|
||||
@ -402,7 +402,7 @@ class BaseController extends Controller
|
||||
|
||||
},
|
||||
'company.company_gateways' => function ($query) use ($user) {
|
||||
$query->whereNotNull('created_at');
|
||||
$query->whereNotNull('created_at')->with('gateway');
|
||||
|
||||
if(!$user->isAdmin())
|
||||
$query->where('company_gateways.user_id', $user->id);
|
||||
|
@ -36,9 +36,9 @@ class QueryLogging
|
||||
{
|
||||
|
||||
// Enable query logging for development
|
||||
if (!Ninja::isHosted() || !config('beacon.enabled')) {
|
||||
return $next($request);
|
||||
}
|
||||
// if (!Ninja::isHosted() || !config('beacon.enabled')) {
|
||||
// return $next($request);
|
||||
// }
|
||||
|
||||
$timeStart = microtime(true);
|
||||
DB::enableQueryLog();
|
||||
@ -55,7 +55,7 @@ class QueryLogging
|
||||
nlog($request->method().' - '.$request->url().": $count queries - ".$time);
|
||||
|
||||
// if($count > 50)
|
||||
//nlog($queries);
|
||||
nlog($queries);
|
||||
|
||||
LightLogs::create(new DbQuery($request->method(), $request->url(), $count, $time))
|
||||
->batch();
|
||||
|
Loading…
x
Reference in New Issue
Block a user