fix bug back navigation
This commit is contained in:
@@ -20,10 +20,16 @@ class LocationService {
|
||||
}
|
||||
|
||||
static async getLocation(country, city, district) {
|
||||
return await db.getAsync(
|
||||
'SELECT id FROM locations WHERE country = ? AND city = ? AND district = ?',
|
||||
[country, city, district]
|
||||
);
|
||||
try {
|
||||
const location = await db.getAsync(
|
||||
'SELECT * FROM locations WHERE country = ? AND city = ? AND district = ?',
|
||||
[country, city, district]
|
||||
);
|
||||
return location;
|
||||
} catch (error) {
|
||||
console.error('Error fetching location:', error);
|
||||
throw new Error('Failed to fetch location');
|
||||
}
|
||||
}
|
||||
|
||||
static async getLocationById(locationId) {
|
||||
|
||||
Reference in New Issue
Block a user