-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
49 lines (48 loc) · 1.27 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
var ZFU = require('./handlers/zfu');
var Zone = require('./handlers/zonage')
var Quartier = require('./handlers/quartierprioritaire');
var config = require('config')
module.exports = [{
method: 'GET',
path: '/zoneville/api/beta/qpprox',
handler: Quartier.qpprox
}, {
method: 'GET',
path: '/zoneville/api/beta/qp',
handler: Quartier.qp
},
{
method: 'POST',
path: '/zoneville/api/v1/qp',
handler: Quartier.qp_post
},
{method: 'GET',
path: '/zoneville/api/beta/zfu',
handler: ZFU.zfu
},
{method: 'GET',
path: '/zoneville/api/beta/zrr/mapservice',
handler: Zone.query
},
{
method: 'GET',
path: '/zoneville/api/beta/zfu/mapservice',
handler: {
proxy: {
mapUri: function (request, callback){
console.log(request.url.search);
callback(null, config.WFS.server + config.WFS.ignkey + config.WFS.url+ 'wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=ZFU_BDD_WLD_WM_20150319:zfu_pm&outputFormat=json&SRSName=EPSG:4326');
},
onResponse: function(err, res, request, reply, settings, ttl){
reply(res).header('access-control-allow-origin', '*');
},
passThrough: false,
xforward: false
}}
},
{
method: 'GET',
path: '/zoneville/api/beta/qp/mapservice',
handler: Quartier.mapservice
},
];