Skip to content

Commit 4ebf2d9

Browse files
committed
bug parametre distance dans le module BDUNI/correction éditoriale
1 parent f74f921 commit 4ebf2d9

File tree

13 files changed

+18
-21
lines changed

13 files changed

+18
-21
lines changed

controllers/bduni/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function createBduniProxy(featureTypeName){
2323
var params = matchedData(req);
2424

2525
/*Valeur par défaut du paramètre distance*/
26-
if ( typeof params.distance == 'undefined' ) { params.distance = 100;}
26+
if ( typeof params.distance == 'undefined' ) {
27+
params.distance = 100;}
2728

2829
/* Value default pour _limit an _start */
2930
if ( typeof params._start == 'undefined' ) { params._start = 0;}
@@ -178,7 +179,8 @@ var moduleValidators = [
178179
check('_limit').optional().isNumeric().withMessage('Le champ "_limit" doit être un entier'),
179180
check('_start').optional().isNumeric().withMessage('Le champ "_start" doit être un entier'),
180181
check('lon').optional().isNumeric().withMessage('La longitude est invalide'),
181-
check('lat').optional().isNumeric().withMessage('La latitude est invalide')
182+
check('lat').optional().isNumeric().withMessage('La latitude est invalide'),
183+
check('distance').optional().isFloat({min: 0}).withMessage('La distance doit être un nombre positif')
182184
];
183185

184186
/**

doc/aoc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: '3.1.0'
22

33
info:
4-
version: '2.8.6'
4+
version: '2.8.7'
55
title: API Carto Appellations viticoles
66
description: >
77
Le module appellations viticoles permet de récupérer les zones intersectant une géométrie GeoJSON.

doc/bduni.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: '3.1.0'
22

33
info:
4-
version: '2.8.6'
4+
version: '2.8.7'
55
title: Module BDUni
66
description: >
77
@@ -108,11 +108,6 @@ components:
108108
description: Le type géométrique
109109
enum:
110110
- Point
111-
- LineString
112-
- Polygon
113-
- MultiPoint
114-
- MultiLineString
115-
- MultiPolygon
116111
coordinates:
117112
type: array
118113
items: {}

doc/cadastre.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: '3.1.0'
22
info:
3-
version: '2.8.6'
3+
version: '2.8.7'
44
title: Module Cadastre
55
description: >
66

doc/codes-postaux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: '3.1.0'
22
info:
3-
version: '2.8.6'
3+
version: '2.8.7'
44
title: API Carto - codes-postaux
55
description: >
66
API de récupération des communes associées à un code postal donné. Voir https://github.com/BaseAdresseNationale/codes-postaux pour plus d'information sur les sources de données.

doc/er.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: '3.1.0'
22
info:
3-
version : '2.8.6'
3+
version : '2.8.7'
44
title: Module Espace revendeur
55
description: >
66

doc/gpu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: '3.1.0'
22
info:
3-
version: '2.8.6'
3+
version: '2.8.7'
44
title: Module urbanisme (GpU)
55
description: >
66
Le service d’interrogation du GPU permet d’obtenir des informations d’urbanisme intersectant une géométrie (ponctuelle ou surfacique).

doc/limites-administratives.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: '3.1.0'
22

33
info:
4-
version: '2.8.6'
4+
version: '2.8.7'
55
title: Module Limites Administratives
66
description: >
77
@@ -278,7 +278,7 @@ components:
278278
type: string
279279
nom_com:
280280
type: string
281-
name_com_m:
281+
nom_com_m:
282282
type: string
283283
insee_arr:
284284
type: string

doc/nature.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: '3.1.0'
22
info:
3-
version: '2.8.6'
3+
version: '2.8.7'
44
title: Module Nature
55
description: >
66

doc/rpg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: '3.1.0'
22

33
info:
4-
version: '2.8.6'
4+
version: '2.8.7'
55
title: Module RPG
66
description: >
77

0 commit comments

Comments
 (0)