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