dashboard: operator-direct schedule submit + cancel endpoints (#444 step 3)

This commit is contained in:
damocles 2026-05-26 01:15:45 +02:00 committed by Mara
commit a31cd8bb15
2 changed files with 87 additions and 0 deletions

View file

@ -841,6 +841,13 @@ fn cancel_authorized(requester: &str, owner: &str) -> bool {
/// Map a `scheduled_prompts::Schedule` to its public wire shape.
/// Field-by-field copy — the two types are intentionally identical;
/// the separation keeps hive-sh4re free of hive-c0re-internal types.
/// Public alias `schedule_to_wire_public` re-exports for
/// `dashboard.rs::api_schedules` without crossing the module
/// boundary into the manager-server file.
pub fn schedule_to_wire_public(s: crate::scheduled_prompts::Schedule) -> hive_sh4re::WireSchedule {
schedule_to_wire(s)
}
fn schedule_to_wire(s: crate::scheduled_prompts::Schedule) -> hive_sh4re::WireSchedule {
hive_sh4re::WireSchedule {
id: s.id,