Skip to content

Commit

Permalink
fix: #146 auth failed without gw_id
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunthegeek committed Nov 20, 2024
1 parent 4efab8a commit 7412b77
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/Http/Controllers/API/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class AuthController extends Controller
public function index(Request $request)
{
$validator = Validator::make($request->all(), [
'gw_id' => 'required|string',
'token' => 'required|string',
'stage' => 'required|string|in:login,logout,counters',
'incoming' => 'required_if:stage,counters|integer',
Expand Down
3 changes: 0 additions & 3 deletions tests/Feature/API/AuthControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public function testLoginSuccess()
$params = [
'stage' => 'login',
'token' => $this->grantToken(),
'gw_id' => 'D4EE073700C2',
];
$response = $this->call('GET', '/auth', $params);

Expand All @@ -46,7 +45,6 @@ public function testLoginWithBadToken()
$params = [
'stage' => 'login',
'token' => 'thisIsABadToken',
'gw_id' => 'D4EE073700C2',
];
$response = $this->call('GET', '/auth', $params);

Expand All @@ -59,7 +57,6 @@ public function testCount()
$params = [
'stage' => 'counters',
'token' => $this->grantToken(),
'gw_id' => 'D4EE073700C2',
'incoming' => rand(1, 999),
'outgoing' => rand(1, 999),
'ip' => fake()->ipv4(),
Expand Down

0 comments on commit 7412b77

Please sign in to comment.