Skip to content

Commit

Permalink
Merge branch 'release/6.0.28'
Browse files Browse the repository at this point in the history
* release/6.0.28:
  compiled assets
  fix for Carbon months overflow
  • Loading branch information
austintoddj committed Mar 31, 2021
2 parents 0fb2138 + 8b2307d commit 172a33b
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 157 deletions.
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/*!
* FilePond 4.26.0
* FilePond 4.26.1
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down
2 changes: 1 addition & 1 deletion public/js/app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/app.js": "/js/app.js?id=54c31fd6ce43d601838b",
"/js/app.js": "/js/app.js?id=bfc3fab42b45585ea9f0",
"/css/app.css": "/css/app.css?id=17b9084a51cfbf270aa4"
}
8 changes: 4 additions & 4 deletions src/Services/StatsAggregator.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ public function getStatsForPost(Post $post): array
]);

$previousViews = $post->views->whereBetween('created_at', [
today()->subMonth()->startOfMonth()->startOfDay()->toDateTimeString(),
today()->subMonth()->endOfMonth()->endOfDay()->toDateTimeString(),
today()->subMonthNoOverflow()->startOfMonth()->startOfDay()->toDateTimeString(),
today()->subMonthNoOverflow()->endOfMonth()->endOfDay()->toDateTimeString(),
]);

$previousVisits = $post->visits->whereBetween('created_at', [
today()->subMonth()->startOfMonth()->startOfDay()->toDateTimeString(),
today()->subMonth()->endOfMonth()->endOfDay()->toDateTimeString(),
today()->subMonthNoOverflow()->startOfMonth()->startOfDay()->toDateTimeString(),
today()->subMonthNoOverflow()->endOfMonth()->endOfDay()->toDateTimeString(),
]);

return [
Expand Down
5 changes: 3 additions & 2 deletions tests/Http/Controllers/PostControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,18 @@ public function testAnAdminCanFetchStatsForAnyPost(): void
{
$post = factory(Post::class)->create([
'user_id' => $this->contributor->id,
'published_at' => now()->subWeek(),
'body' => null,
]);

factory(View::class)->create([
'post_id' => $post->id,
'created_at' => now()->subMonth(),
'created_at' => now()->subMonthNoOverflow(),
]);

factory(Visit::class)->create([
'post_id' => $post->id,
'created_at' => now()->subMonth(),
'created_at' => now()->subMonthNoOverflow(),
]);

$this->actingAs($this->admin, 'canvas')
Expand Down
323 changes: 176 additions & 147 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 172a33b

Please sign in to comment.