refactor(api): remove hardcoded gym rental service from yclients response

This commit is contained in:
killua
2025-11-05 22:26:26 +03:00
parent 2f4e0d59aa
commit 30e2091ded

View File

@@ -5,20 +5,20 @@ import { YCLIENTS_TOKEN, YCLIENTS_API_URL } from 'astro:env/server'
type HTML = string type HTML = string
const currencyFormatter = Intl.NumberFormat('ru', { currency: 'rub' }) const currencyFormatter = Intl.NumberFormat('ru', { currency: 'rub' })
const RENT_GYM_SERVICE: z.infer<typeof servicesSchema> = { // const RENT_GYM_SERVICE: z.infer<typeof servicesSchema> = {
title: 'Аренда зала', // title: 'Аренда зала',
charachteristics: [ // charachteristics: [
{ // {
title: 'Разовое посещение', // title: 'Разовое посещение',
description: 'Разовое посещение студии для самостоятельной тренировки', // description: 'Разовое посещение студии для самостоятельной тренировки',
price: `${currencyFormatter.format(1500)} ₽`, // price: `${currencyFormatter.format(1500)} ₽`,
link: { // link: {
title: 'Записаться', // title: 'Записаться',
href: 'https://n1381542.yclients.com/company/1254211/activity/select?o=act', // href: 'https://n1381542.yclients.com/company/1254211/activity/select?o=act',
}, // },
}, // },
], // ],
} // }
export type YclientsBookinRawResponse = { export type YclientsBookinRawResponse = {
category: { category: {
@@ -90,6 +90,6 @@ export const yclientsClient = {
})), })),
})) }))
return [services[0], RENT_GYM_SERVICE, ...services.slice(1)] return services
}, },
} }