diff --git a/src/app/Http/Controllers/API/V4/FsController.php b/src/app/Http/Controllers/API/V4/FsController.php --- a/src/app/Http/Controllers/API/V4/FsController.php +++ b/src/app/Http/Controllers/API/V4/FsController.php @@ -794,6 +794,9 @@ $result += $props; } + $result['updated_at'] = $object->updated_at->toDateTimeString(); + $result['created_at'] = $object->created_at->toDateTimeString(); + return $result; } diff --git a/src/tests/Feature/Controller/FsTest.php b/src/tests/Feature/Controller/FsTest.php --- a/src/tests/Feature/Controller/FsTest.php +++ b/src/tests/Feature/Controller/FsTest.php @@ -452,6 +452,8 @@ $json = $response->json(); $this->assertSame($file->id, $json['id']); + $this->assertSame($file->updated_at->toDateTimeString(), $json['updated_at']); + $this->assertSame($file->created_at->toDateTimeString(), $json['created_at']); $this->assertSame($file->getProperty('mimetype'), $json['mimetype']); $this->assertSame((int) $file->getProperty('size'), $json['size']); $this->assertSame($file->getProperty('name'), $json['name']);