refactor(drive): match DriveKind directly instead of Drive::is_personal()
Drops the boolean is_personal() wrapper in favor of matching DriveKind::Personal/Shared at the two call sites, matching the exhaustive-match convention already used for DriveKind elsewhere (as_str, parse, DriveKindDto::from).
This commit is contained in:
@@ -556,7 +556,10 @@ impl DriveManagementService {
|
||||
let drive = self.drive_repo.get_by_id(drive_id).await.map_err(|e| {
|
||||
DomainError::internal_error("Drive", format!("Failed to fetch drive: {e:?}"))
|
||||
})?;
|
||||
if drive.drive.is_personal() {
|
||||
if matches!(
|
||||
drive.drive.kind,
|
||||
crate::domain::entities::drive::DriveKind::Personal
|
||||
) {
|
||||
tracing::info!(
|
||||
target: "audit",
|
||||
event = "drive_membership.rejected",
|
||||
|
||||
Reference in New Issue
Block a user