feat: (broken) implement route map and address autocomplete widgets with associated infrastructure testing scripts
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
const travel = require('./src/travel.js');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
const auth = require('./utils/auth.js');
|
||||
auth.authenticateUser = async () => ({ uid: 'dummy' });
|
||||
|
||||
async function test() {
|
||||
const req = {
|
||||
headers: { authorization: 'Bearer dummy' },
|
||||
body: { origin: "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France", destination: "Grenoble, France", vehicleCategory: "2" }
|
||||
};
|
||||
const res = {
|
||||
status: function() { return this; },
|
||||
json: function(data) { console.log(JSON.stringify(data, null, 2)); }
|
||||
};
|
||||
await travel.googleMapsComputeRoute(req, res);
|
||||
}
|
||||
test();
|
||||
Reference in New Issue
Block a user