fix: export missing getLocations and getServices functions to resolve build error

This commit is contained in:
AyrisAI
2026-05-16 01:02:30 +03:00
parent 40849ea0a8
commit ae2d1d2e47

View File

@@ -117,6 +117,7 @@ export async function getLocationBySlug(slug: string) {
}
}
export async function getProjectsByService(serviceName: string) {
try {
// Search projects where the serviceName is in the title or categories
@@ -133,3 +134,21 @@ export async function getProjectsByService(serviceName: string) {
return [];
}
}
export async function getLocations() {
try {
return await sql`SELECT * FROM locations ORDER BY name ASC`;
} catch (error) {
console.error('Error fetching locations:', error);
return [];
}
}
export async function getServices() {
try {
return await sql`SELECT * FROM services ORDER BY display_order ASC`;
} catch (error) {
console.error('Error fetching services:', error);
return [];
}
}