don't cache for now #36
This commit is contained in:
@@ -28,13 +28,14 @@ class ApiAuth
|
|||||||
|
|
||||||
// Try to find the user via API key. Cache this lookup
|
// Try to find the user via API key. Cache this lookup
|
||||||
$api_key = $request->header('Authorization');
|
$api_key = $request->header('Authorization');
|
||||||
$user = Cache::remember(
|
$user = User::where('apikey', $api_key)->first();
|
||||||
|
/*$user = Cache::remember(
|
||||||
config('cache.keys.USER_API_KEY.key') . $api_key,
|
config('cache.keys.USER_API_KEY.key') . $api_key,
|
||||||
config('cache.keys.USER_API_KEY.time'),
|
config('cache.keys.USER_API_KEY.time'),
|
||||||
function () use ($api_key) {
|
function () use ($api_key) {
|
||||||
return User::where('apikey', $api_key)->first();
|
return User::where('apikey', $api_key)->first();
|
||||||
}
|
}
|
||||||
);
|
);*/
|
||||||
|
|
||||||
if(!$user) {
|
if(!$user) {
|
||||||
return $this->unauthorized();
|
return $this->unauthorized();
|
||||||
|
|||||||
Reference in New Issue
Block a user