feat: use drink api in front and more #16

Merged
Clement merged 47 commits from feat/use-drink-api-in-front into master 2024-06-07 17:09:58 +00:00
4 changed files with 15 additions and 4 deletions
Showing only changes of commit 81b3b8bc2a - Show all commits

View File

@ -1,5 +1,8 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
testPathIgnorePatterns: [
"<rootDir>/dist/"
],
testTimeout: 10000,
preset: 'ts-jest',
testEnvironment: 'node',

View File

@ -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))
}

View File

@ -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'})

View File

@ -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
]