feat: use drink api in front and more #16
@ -1,5 +1,8 @@
|
||||
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
||||
module.exports = {
|
||||
testPathIgnorePatterns: [
|
||||
"<rootDir>/dist/"
|
||||
],
|
||||
testTimeout: 10000,
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
|
@ -189,12 +189,9 @@ export async function getBox(req:express.Request, res: express.Response) {
|
||||
return
|
||||
}
|
||||
|
||||
console.log("RATE: ", rate);
|
||||
|
||||
if(!rate){
|
||||
rate = "1";
|
||||
}
|
||||
console.log("RATE: ", rate);
|
||||
|
||||
res.send( await callBox(lon1, lat1, lon2, lat2, rate))
|
||||
}
|
||||
|
@ -219,6 +219,14 @@ describe("Test the otm city path", () => {
|
||||
}
|
||||
]
|
||||
}
|
||||
function sleep(milliseconds: number) {
|
||||
const date = Date.now();
|
||||
let currentDate = null;
|
||||
do {
|
||||
currentDate = Date.now();
|
||||
} while (currentDate - date < milliseconds);
|
||||
}
|
||||
sleep(2000);
|
||||
request(app)
|
||||
.get("/otm/box")
|
||||
.query({'lon1':'-1.435199','lon2':'-1.43519', 'lat1':'46.668460', 'lat2':'46.668461'})
|
||||
|
@ -1,5 +1,8 @@
|
||||
vars {
|
||||
EXPRESS_API: https://drink-tweb.cb85.fr
|
||||
OTM_KEY: 5ae2e3f221c38a28845f05b6494c021573d9608a4d749ce8af625e0f
|
||||
PB_URL: https://pb-tweb.cb85.fr
|
||||
TRIPMAP_URL: https://api.opentripmap.com/0.1/
|
||||
}
|
||||
vars:secret [
|
||||
OTM_KEY
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user