Skip to content

Commit

Permalink
Merge pull request #1369 from shikorism/fix/api-current-session-elaps…
Browse files Browse the repository at this point in the history
…ed-type-break

GET /api/v1/me, GET /api/v1/users/{user} の checkin_summary.current_session_elapsed の型を整数に修正
  • Loading branch information
shibafu528 authored Dec 7, 2024
2 parents 022bb8c + 87fa084 commit 25a26d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ public function checkinSummary(): ?array
->orderByDesc('ejaculated_date')
->first();
if (!empty($latestEjaculation)) {
$currentSession = $latestEjaculation->ejaculated_date
->diffInSeconds(Carbon::now());
$currentSession = (int) $latestEjaculation->ejaculated_date->diffInSeconds(Carbon::now());
} else {
$currentSession = null;
}
Expand Down

0 comments on commit 25a26d4

Please sign in to comment.