fix: export missing getLocations and getServices functions to resolve build error
This commit is contained in:
@@ -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 [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user