feat(drive): add drive deletion

- conditions: drive must be empty
    - deletion forbidden on main personal drive
This commit is contained in:
Edouard Vanbelle
2026-06-24 21:17:24 +02:00
parent 33cfa876d0
commit 7d24015fc4
15 changed files with 673 additions and 2 deletions
+7
View File
@@ -33,6 +33,12 @@ pub enum ErrorKind {
DatabaseError,
/// Storage quota exceeded
QuotaExceeded,
/// State conflict — the request is well-formed and permitted, but
/// the resource is in a state that refuses it (e.g. "drive must
/// be empty before delete"). Maps to HTTP 409. Distinct from
/// `AlreadyExists` (which is a uniqueness violation) so audit
/// readers can tell them apart.
Conflict,
}
impl Display for ErrorKind {
@@ -48,6 +54,7 @@ impl Display for ErrorKind {
ErrorKind::UnsupportedOperation => write!(f, "Unsupported Operation"),
ErrorKind::DatabaseError => write!(f, "Database Error"),
ErrorKind::QuotaExceeded => write!(f, "Quota Exceeded"),
ErrorKind::Conflict => write!(f, "Conflict"),
}
}
}