mirror of
https://github.com/mblanke/Gov_Travel_App.git
synced 2026-03-01 06:00:21 -05:00
- Implemented multiple scripts to check and inspect meal plans, scraped data, and accommodations for Munich and Riga. - Added a migration script to convert scraped data into the application's database format. - Introduced new database service methods for querying and updating travel rates. - Enhanced server configuration for serving static files in production. - Updated PostCSS configuration for consistency.
42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
const db = require("../services/databaseService");
|
|
|
|
async function updateRigaRate() {
|
|
await db.connect();
|
|
|
|
return new Promise((resolve, reject) => {
|
|
db.db.run(
|
|
`
|
|
UPDATE travel_rates
|
|
SET jan_accommodation = 209,
|
|
feb_accommodation = 209,
|
|
mar_accommodation = 209,
|
|
apr_accommodation = 209,
|
|
may_accommodation = 209,
|
|
jun_accommodation = 209,
|
|
jul_accommodation = 209,
|
|
aug_accommodation = 209,
|
|
sep_accommodation = 209,
|
|
oct_accommodation = 209,
|
|
nov_accommodation = 209,
|
|
dec_accommodation = 209,
|
|
standard_accommodation = 209,
|
|
currency = 'CAD'
|
|
WHERE LOWER(city_name) = 'riga'
|
|
`,
|
|
[],
|
|
(err) => {
|
|
if (err) {
|
|
console.error("❌ Error:", err);
|
|
reject(err);
|
|
} else {
|
|
console.log("✅ Riga accommodation updated to CAD $209");
|
|
resolve();
|
|
}
|
|
db.close();
|
|
}
|
|
);
|
|
});
|
|
}
|
|
|
|
updateRigaRate().catch(console.error);
|