mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 18:28:54 +00:00
Check if request has api_token(v2 API) or apikey(v1 API)
This commit is contained in:
+2
-1
@@ -862,7 +862,8 @@ class User extends Authenticatable
|
||||
*/
|
||||
public static function getCategoryExclusionForApi(Request $request): array
|
||||
{
|
||||
$user = self::getByRssToken($request->input('api_token'));
|
||||
$apiToken = $request->has('api_token') ? $request->input('api_token') : $request->input('apikey');
|
||||
$user = self::getByRssToken($apiToken);
|
||||
|
||||
return self::getCategoryExclusionById($user->id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user