fix(veesp): IP и характеристики VPS при синке, валюта аккаунта
Docker / build (push) Failing after 21s
Docker / build (push) Failing after 21s
Парсинг object-map ответов API (vms/ips), cpus, memory в МБ, IP-массив. Приоритет валюты аккаунта над baseCurrency хостера; поле в UI для Veesp. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -175,10 +175,10 @@ export function toIsoCurrency(currency?: string | null): string {
|
||||
}
|
||||
|
||||
export function effectiveVpsTariffCurrency(vps: Vps, provider?: Provider | null): string {
|
||||
const provRaw = (provider?.baseCurrency || '').trim()
|
||||
if (provRaw) return toIsoCurrency(provRaw)
|
||||
const ownRaw = (vps?.currency || '').trim()
|
||||
if (ownRaw) return toIsoCurrency(ownRaw)
|
||||
const provRaw = (provider?.baseCurrency || '').trim()
|
||||
if (provRaw) return toIsoCurrency(provRaw)
|
||||
return 'RUB'
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ export const providerAccountSchema = z.object({
|
||||
apiLogin: z.string().optional().default(''),
|
||||
apiPassword: z.string().optional().default(''),
|
||||
billingMode: billingModeSchema.default('monthly'),
|
||||
currency: z.string().optional().default(''),
|
||||
balanceAlertBelow: z.union([z.coerce.number().min(0), z.literal('')]).optional(),
|
||||
notes: z.string().optional().default(''),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user