api resource refactoring part 3

This commit is contained in:
Peter Papp
2021-08-27 11:01:44 +02:00
parent 174f2a2c1f
commit d299183ecd
16 changed files with 101 additions and 91 deletions

View File

@@ -84,32 +84,6 @@ class File extends Model
$this->public_access = $token;
}
/**
* Format created at date
*/
public function getCreatedAtAttribute(): string
{
return format_date(
set_time_by_user_timezone($this->attributes['created_at']),
__t('time')
);
}
/**
* Format deleted at date reformat
*/
public function getDeletedAtAttribute(): string | null
{
if (! $this->attributes['deleted_at']) {
return null;
}
return format_date(
set_time_by_user_timezone($this->attributes['deleted_at']),
__t('time')
);
}
/**
* Format fileSize
*/