add / show comments working

This commit is contained in:
isUnknown 2024-10-23 11:32:51 +02:00
parent a9992b0ff5
commit 6bffbc1707
10 changed files with 163 additions and 40 deletions

View file

@ -5,7 +5,7 @@ function getFileData($file) {
'url' => $file->url(),
'uuid' => (string) $file->uuid(),
'name' => $file->filename(),
'type' => (string) $file->type()
'type' => (string) $file->type(),
];
if ($file->description()->exists()) {
@ -13,5 +13,9 @@ function getFileData($file) {
$data['tags'] = $file->tags()->split();
};
if($file->comments()->exists()) {
$data['comments'] = Data::decode($file->comments()->value(), 'yaml');
}
return $data;
}