add box route
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 23s
Build Docker Image Back / run (pull_request) Successful in 41s
JsDocs / coverage (pull_request) Successful in 37s
Test and coverage / coverage (pull_request) Successful in 1m22s

This commit is contained in:
Clement 2024-05-18 14:35:28 +02:00
parent 4ffef9be27
commit 02dc74bb79

View File

@ -1,4 +1,4 @@
import { getCity, getRadius, getPoiId } from "./openTripMaps"
import { getCity, getRadius, getPoiId, getBox } from "./openTripMaps"
import express from "express"
/**
* Initialize Express application instance.
@ -107,7 +107,7 @@ app.get("/otm/radius", getRadius)
* type: string
* responses:
* 200:
* description: Return a list of bars and coffee in city in geoJSON format
* description: Return the detaill of an POI in otm
* 400:
* description: Missing Argument Error
* 401:
@ -115,4 +115,53 @@ app.get("/otm/radius", getRadius)
*/
app.get("/otm/poidetaill", getPoiId)
/**
* @openapi
* /otm/box:
* get:
* summary: return the drinks in a box
* description: return the drinks in a defined box
* parameters:
* - name: lon1
* in: query
* required: true
* description: longitude 1 of the box
* schema:
* type: number
* minimum: -180
* maximum: 180
* - name: lat1
* in: query
* required: true
* description: latitude 1 of the box
* schema:
* type: number
* minimum: -90
* maximum: 90
* - name: lon2
* in: query
* required: true
* description: longitude 2 of the box
* schema:
* type: number
* minimum: -180
* maximum: 180
* - name: lat2
* in: query
* required: true
* description: latitude 2 of the box
* schema:
* type: number
* minimum: -90
* maximum: 90
* responses:
* 200:
* description: Return a list of bars and coffee in city in geoJSON format
* 400:
* description: Missing Argument Error
* 401:
* description: Missing OTM tocken
*/
app.get("/otm/box", getBox)
export default app