refactor(application): strip comments, DRY ownership check + parse_content_type
This commit is contained in:
@@ -3,20 +3,16 @@ use uuid::Uuid;
|
||||
use domain::models::ScheduleConfig;
|
||||
use domain::value_objects::RecyclePolicy;
|
||||
|
||||
/// Create a new channel.
|
||||
pub struct CreateChannelCommand {
|
||||
pub owner_id: Uuid,
|
||||
pub name: String,
|
||||
pub timezone: String,
|
||||
}
|
||||
|
||||
/// Update an existing channel (partial — only `Some` fields are applied).
|
||||
pub struct UpdateChannelCommand {
|
||||
pub channel_id: Uuid,
|
||||
/// Used for ownership check.
|
||||
pub owner_id: Uuid,
|
||||
pub name: Option<String>,
|
||||
/// `Some(None)` clears the description; `None` leaves it unchanged.
|
||||
pub description: Option<Option<String>>,
|
||||
pub timezone: Option<String>,
|
||||
pub schedule_config: Option<ScheduleConfig>,
|
||||
@@ -24,9 +20,7 @@ pub struct UpdateChannelCommand {
|
||||
pub auto_schedule: Option<bool>,
|
||||
}
|
||||
|
||||
/// Delete a channel.
|
||||
pub struct DeleteChannelCommand {
|
||||
pub channel_id: Uuid,
|
||||
/// Used for ownership check.
|
||||
pub owner_id: Uuid,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user