adding user authentication
This commit is contained in:
@@ -61,4 +61,26 @@ impl From<FileDto> for File {
|
||||
dto.modified_at
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl FileDto {
|
||||
/// Creates an empty file DTO for stub implementations
|
||||
pub fn empty() -> Self {
|
||||
Self {
|
||||
id: "stub-id".to_string(),
|
||||
name: "stub-file".to_string(),
|
||||
path: "/stub/path".to_string(),
|
||||
size: 0,
|
||||
mime_type: "application/octet-stream".to_string(),
|
||||
folder_id: None,
|
||||
created_at: 0,
|
||||
modified_at: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for FileDto {
|
||||
fn default() -> Self {
|
||||
Self::empty()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user