123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- const users = [{
- id: 1,
- name: "Richard Hendricks",
- email: "richard@piedpiper.com",
- },
- {
- id: 2,
- name: "Bertram Gilfoyls",
- email: "gilfoyle@piedpiper.com",
- },
- ];
- // Router
- const router = app => {
- app.get('/', (request, response) => {
- response.send({
- "0": {
- "temp": "18",
- "icon": "blackRain"
- },
- "1": {
- "temp": "18",
- "icon": "blackRain"
- },
- "2": {
- "temp": "18",
- "icon": "blackRain"
- },
- "3": {
- "temp": "18",
- "icon": "blackRain"
- },
- "4": {
- "temp": "18",
- "icon": "blackRain"
- },
- "5": {
- "temp": "18",
- "icon": "blackRain"
- },
- "6": {
- "temp": "18",
- "icon": "blackRain"
- },
- "7": {
- "temp": "19",
- "icon": "sun"
- },
- "8": {
- "temp": "19",
- "icon": "sun"
- },
- "9": {
- "temp": "20",
- "icon": "sun"
- },
- "10": {
- "temp": "21",
- "icon": "sun"
- },
- "11": {
- "temp": "22",
- "icon": "sun"
- },
- "12": {
- "temp": "22",
- "icon": "sun"
- },
- "13": {
- "temp": "23",
- "icon": "sun"
- },
- "14": {
- "temp": "25",
- "icon": "sun"
- },
- "15": {
- "temp": "27",
- "icon": "sun"
- },
- "16": {
- "temp": "27",
- "icon": "cloudy"
- },
- "17": {
- "temp": "25",
- "icon": "cloudy"
- },
- "18": {
- "temp": "24",
- "icon": "cloudy"
- },
- "19": {
- "temp": "22",
- "icon": "cloudy"
- },
- "20": {
- "temp": "22",
- "icon": "cloudy"
- },
- "21": {
- "temp": "21",
- "icon": "blackCloudy"
- },
- "22": {
- "temp": "18",
- "icon": "blackCloudy"
- },
- "23": {
- "temp": "18",
- "icon": "blackCloudy"
- },
- "_id": {
- "$oid": "5f2075c01df7d5417c805809"
- },
- "minTemp": "18",
- "maxTemp": "27"
- });
- });
- app.get('/kiyv', (request, response) => {
- response.send(
- {
- "0": {
- "temp": "18",
- "icon": "blackRain"
- },
- "1": {
- "temp": "18",
- "icon": "blackRain"
- },
- "2": {
- "temp": "18",
- "icon": "blackRain"
- },
- "3": {
- "temp": "18",
- "icon": "blackRain"
- },
- "4": {
- "temp": "18",
- "icon": "blackRain"
- },
- "5": {
- "temp": "18",
- "icon": "blackRain"
- },
- "6": {
- "temp": "18",
- "icon": "blackRain"
- },
- "7": {
- "temp": "19",
- "icon": "sun"
- },
- "8": {
- "temp": "19",
- "icon": "sun"
- },
- "9": {
- "temp": "20",
- "icon": "sun"
- },
- "10": {
- "temp": "21",
- "icon": "sun"
- },
- "11": {
- "temp": "22",
- "icon": "sun"
- },
- "12": {
- "temp": "22",
- "icon": "sun"
- },
- "13": {
- "temp": "23",
- "icon": "sun"
- },
- "14": {
- "temp": "25",
- "icon": "sun"
- },
- "15": {
- "temp": "27",
- "icon": "sun"
- },
- "16": {
- "temp": "27",
- "icon": "cloudy"
- },
- "17": {
- "temp": "25",
- "icon": "cloudy"
- },
- "18": {
- "temp": "24",
- "icon": "cloudy"
- },
- "19": {
- "temp": "22",
- "icon": "cloudy"
- },
- "20": {
- "temp": "22",
- "icon": "cloudy"
- },
- "21": {
- "temp": "21",
- "icon": "blackCloudy"
- },
- "22": {
- "temp": "18",
- "icon": "blackCloudy"
- },
- "23": {
- "temp": "18",
- "icon": "blackCloudy"
- },
- "_id": {
- "$oid": "5f2075c01df7d5417c805809"
- },
- "minTemp": "18",
- "maxTemp": "27"
- }
- );
- });
- app.get('/users', (request, response) => {
- response.send(users);
- });
- }
- // Export the router
- module.exports = router;
|