Skip to content

Commit 05f143d

Browse files
committed
Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <[email protected]> # Conflicts: # config/version.php
2 parents 64aeaee + e86996b commit 05f143d

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

config/version.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22
return array (
3-
'app_version' => 'v8.1.4',
4-
'full_app_version' => 'v8.1.4 - build 18245-g101b8afb5',
5-
'build_version' => '18245',
3+
'app_version' => 'v8.1.5',
4+
'full_app_version' => 'v8.1.5 - build 18388-g64aeaeeee',
5+
'build_version' => '18388',
66
'prerelease_version' => '',
7-
'hash_version' => 'g101b8afb5',
8-
'full_hash' => 'v8.1.4-180-g101b8afb5',
7+
'hash_version' => 'g64aeaeeee',
8+
'full_hash' => 'v8.1.5-141-g64aeaeeee',
99
'branch' => 'master',
1010
);

routes/api.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,11 @@
13241324
return response()->json(
13251325
[
13261326
'version' => config('version.app_version'),
1327-
], 200);
1327+
'build_version' => config('version.build_version'),
1328+
'hash_version' => config('version.hash_version'),
1329+
'full_version' => config('version.full_app_version')
1330+
]
1331+
);
13281332
}); // end version api routes
13291333

13301334

tests/Feature/ApiRateLimitTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,25 @@ public function testRateLimitDecreasesRemaining()
3939
->assertHeader('Retry-After', 60);
4040
}
4141

42+
public function testRateLimitDecreasesRemainingOverSixty()
43+
{
44+
config(['app.api_throttle_per_minute' => 80]);
45+
$expected_remaining = (config('app.api_throttle_per_minute') - 1);
46+
$admin = User::factory()->create();
47+
48+
for ($x = 0; $x < 5; $x++) {
49+
50+
$this->actingAsForApi($admin)
51+
->getJson(route('api.users.me'))
52+
->assertOk()
53+
->assertHeader('X-Ratelimit-Remaining', $expected_remaining--);
54+
55+
}
56+
57+
$this->actingAsForApi($admin)
58+
->getJson(route('api.users.me'))
59+
->assertStatus(200)
60+
->assertHeader('Retry-After', 60);
61+
}
62+
4263
}

0 commit comments

Comments
 (0)