Files
webapp/server/api/companies.get.ts
2026-01-07 09:10:35 +07:00

149 lines
3.4 KiB
TypeScript

export default defineEventHandler(async (event) => {
const query = getQuery(event)
const locale = query.locale || 'ru'
// Service companies data with translations
const companiesData = {
ru: {
logistics: [
{
id: 1,
name: "RosLogistic",
price: 15000,
description: "Federal transportation network",
rating: 4.8,
reviews: 156,
experience: "15 years experience",
verified: true
},
{
id: 2,
name: "TransService",
price: 12000,
description: "Regional carrier",
rating: 4.5,
reviews: 89,
experience: "8 years experience",
verified: false
}
],
banks: [
{
id: 1,
name: "VTB",
rate: 12.5,
terms: "Raw materials purchase loan",
period: "up to 24 months",
rating: 4.7,
reviews: 89,
verified: true
},
{
id: 2,
name: "Sberbank",
rate: 13.2,
terms: "Trade financing",
period: "up to 18 months",
rating: 4.9,
reviews: 145,
verified: true
}
],
insurance: [
{
id: 1,
name: "RESO",
cost: 3500,
coverage: "Cargo insurance up to 500M₽",
rating: 4.6,
reviews: 67,
verified: true
}
],
laboratories: [
{
id: 1,
name: "MetalTest",
price: 8000,
tests: "Chemical analysis, mechanical properties",
certification: "ISO 9001",
rating: 4.7,
reviews: 45,
verified: true
}
]
},
en: {
logistics: [
{
id: 1,
name: "RusLogistics",
price: 15000,
description: "Federal transportation network",
rating: 4.8,
reviews: 156,
experience: "15 years experience",
verified: true
},
{
id: 2,
name: "TransService",
price: 12000,
description: "Regional carrier",
rating: 4.5,
reviews: 89,
experience: "8 years experience",
verified: false
}
],
banks: [
{
id: 1,
name: "VTB Bank",
rate: 12.5,
terms: "Raw materials purchase loan",
period: "up to 24 months",
rating: 4.7,
reviews: 89,
verified: true
},
{
id: 2,
name: "Sberbank",
rate: 13.2,
terms: "Trade financing",
period: "up to 18 months",
rating: 4.9,
reviews: 145,
verified: true
}
],
insurance: [
{
id: 1,
name: "RESO Insurance",
cost: 3500,
coverage: "Cargo insurance up to 500M₽",
rating: 4.6,
reviews: 67,
verified: true
}
],
laboratories: [
{
id: 1,
name: "MetalTest Lab",
price: 8000,
tests: "Chemical analysis, mechanical properties",
certification: "ISO 9001",
rating: 4.7,
reviews: 45,
verified: true
}
]
}
}
return companiesData[locale as 'ru' | 'en'] || companiesData.ru
})