mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-10 03:09:50 +08:00
refactor(workspace): enforce layered crate boundaries
This commit is contained in:
@@ -23,6 +23,14 @@ export interface GlobalModelFormPayloadState {
|
||||
is_active?: boolean
|
||||
}
|
||||
|
||||
export function cloneTieredPricingConfig(
|
||||
pricing: TieredPricingConfig,
|
||||
): TieredPricingConfig {
|
||||
// Presets live inside a Vue ref and can therefore be reactive proxies, which
|
||||
// structuredClone cannot clone directly. Pricing configs are JSON payloads.
|
||||
return JSON.parse(JSON.stringify(pricing)) as TieredPricingConfig
|
||||
}
|
||||
|
||||
function cleanGlobalModelConfig(form: GlobalModelFormPayloadState): Record<string, unknown> | undefined {
|
||||
return form.config && Object.keys(form.config).length > 0 ? form.config : undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user