mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 09:48:55 +00:00
Check if request has api_token(v2 API) or apikey(v1 API)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
2018-12-12 DariusIII
|
||||
* Chg: Check if request has api_token(v2 API) or apikey(v1 API)
|
||||
* Fix: Fix User error on APIv2 and ApiTransformer data
|
||||
* Chg: Update user category exclusion handling in API and APIv2
|
||||
* Chg: Remove requirement for userid when using RSS, API and APIv2, its useless as we already have the token
|
||||
|
||||
+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