use serde::Deserialize;
use crate::error::AppError;
pub use crate::routines::{Flag, RoutineStore};
#[derive(Deserialize, utoipa::ToSchema)]
pub struct CreateFlagRequest {
#[serde(rename = "type")]
pub flag_type: String,
pub description: String,
pub scope: String,
}
pub fn build(
store: &RoutineStore,
id: &str,
flag_type: &str,
description: &str,
scope: &str,
) -> Result<Flag, AppError> {
crate::routines::svc_create_flag(store, id, flag_type, description, scope)
}
#[cfg(test)]
#[path = "logic_tests.rs"]
mod logic_tests;