沈斌
2018-07-10 95c7bdc5deb322f8fa9b387f98e058fcfb312980
updates
1 files modified
11 ■■■■■ changed files
routes/index.js 11 ●●●●● patch | view | raw | blame | history
routes/index.js
@@ -22,7 +22,7 @@
        var response = yield request({
            uri: url,
            method: "POST",
            headers: {'Authorization':'APPCODE 77eac517509d412a817a5a4eb07310ba'},
            headers: {'Authorization':'APPCODE 31b6ea8f804a4472be3b633cfee44849'},
            form: {
                "cityId": cityID,
                "token": tokens[apiKey]
@@ -36,16 +36,13 @@
    router.get('/gk', wrap(function* (req, res, next) {
        var apiKey = req.query.apiKey;
        var cityID = req.query.cityID;
        var url = 'https://api.epmap.org/api/v1/air/' + key;
        var stationCode = req.query.stationCode;
        var url = 'http://api.epmap.org/api/v1/air/' + apiKey + '?station_code=' + stationCode;
        // noinspection JSAnnotator
        var response = yield request({
            uri: url,
            method: "GET",
            headers: {'Authorization':'APPCODE 77eac517509d412a817a5a4eb07310ba'},
            form: {
                "station_code": cityID
            }
            headers: {'Authorization':'APPCODE 31b6ea8f804a4472be3b633cfee44849'}
        });
        var data = JSON.parse(response.body);