fix(drive): fix drive_id on copy to other drive
- fix alsot drive_id exposition
This commit is contained in:
@@ -125,6 +125,11 @@ pub struct FavoriteResourceRow {
|
||||
pub resource_created_at: DateTime<Utc>,
|
||||
pub modified_at: DateTime<Utc>,
|
||||
pub owner_id: Uuid,
|
||||
/// Drive that owns this row. Surfaced on the favorites listing
|
||||
/// so a UI can tell when a favorited item lives in a different
|
||||
/// drive than the user's home (post-D6 cross-drive moves +
|
||||
/// copies make this reachable).
|
||||
pub drive_id: Uuid,
|
||||
/// Raw BLAKE3 content hash. `Some(_)` for file rows, `None` for
|
||||
/// folder rows. Routes into `FileDto::content_hash` and feeds
|
||||
/// `File::compute_etag` to populate `FileDto::etag`.
|
||||
|
||||
@@ -206,6 +206,12 @@ pub struct FolderResourceRow {
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub modified_at: DateTime<Utc>,
|
||||
pub owner_id: Uuid,
|
||||
/// Drive that owns this row. Same column as
|
||||
/// `storage.folders.drive_id` / `storage.files.drive_id`. Surfaced
|
||||
/// on the listing so a UI can tell when a child lives in a
|
||||
/// different drive than its parent (post-D6 cross-drive moves +
|
||||
/// copies make this reachable).
|
||||
pub drive_id: Uuid,
|
||||
/// Raw BLAKE3 content hash. `Some(_)` for file rows, `None` for
|
||||
/// folder rows. Populates `FileDto::content_hash` + `FileDto::etag`
|
||||
/// on the REST `/api/folders/{id}/resources` listing so API
|
||||
|
||||
@@ -105,6 +105,11 @@ pub struct RecentResourceRow {
|
||||
pub resource_created_at: DateTime<Utc>,
|
||||
pub modified_at: DateTime<Utc>,
|
||||
pub owner_id: Uuid,
|
||||
/// Drive that owns this row. Surfaced on the recent listing
|
||||
/// so a UI can tell when a recently-accessed item lives in a
|
||||
/// different drive than the user's home (post-D6 cross-drive
|
||||
/// moves + copies make this reachable).
|
||||
pub drive_id: Uuid,
|
||||
/// Raw BLAKE3 content hash. `Some(_)` for file rows, `None` for
|
||||
/// folder rows. Feeds `File::compute_etag` so this listing's
|
||||
/// `etag` matches GET/HEAD/PROPFIND for the same file.
|
||||
|
||||
@@ -155,6 +155,10 @@ pub struct SearchFolderResultDto {
|
||||
pub path: String,
|
||||
/// Parent folder ID
|
||||
pub parent_id: Option<String>,
|
||||
/// Drive that owns this folder. Same column as `storage.folders.drive_id`,
|
||||
/// carried through so downstream callers (e.g. the NC search REPORT
|
||||
/// handler) can populate `FolderDto::drive_id` without a fallback sentinel.
|
||||
pub drive_id: uuid::Uuid,
|
||||
/// Creation timestamp
|
||||
pub created_at: u64,
|
||||
/// Last modification timestamp
|
||||
|
||||
@@ -241,6 +241,7 @@ impl SearchService {
|
||||
name: folder.name.clone(),
|
||||
path: folder.path.clone(),
|
||||
parent_id: folder.parent_id.clone(),
|
||||
drive_id: folder.drive_id,
|
||||
created_at: folder.created_at,
|
||||
modified_at: folder.modified_at,
|
||||
is_root: folder.is_root,
|
||||
|
||||
Reference in New Issue
Block a user