From 95c7bdc5deb322f8fa9b387f98e058fcfb312980 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Tue, 10 Jul 2018 20:34:02 +0800
Subject: [PATCH] updates

---
 routes/index.js |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/routes/index.js b/routes/index.js
index 04a2019..473d062 100644
--- a/routes/index.js
+++ b/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);
 

--
Gitblit v1.8.0