Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit a6283c3

Browse files
author
Robert Kummer
committed
remove health check file
1 parent 84d1190 commit a6283c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/Http/Controllers/Api/HealthController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ class HealthController extends ApiController
88
{
99
public function health()
1010
{
11-
if (file_put_contents(storage_path('health.txt'), date('Y-m-d H:i:s')) === false) {
11+
$healthCheckFile = storage_path('health.txt');
12+
if (file_put_contents($healthCheckFile, date('Y-m-d H:i:s')) === false) {
1213
return $this->respond(503, 'storage unavailable');
1314
}
1415

16+
unlink($healthCheckFile);
1517
return $this->respond(200, 'healthy');
1618
}
1719

0 commit comments

Comments
 (0)