const express = require('express')
const router = express.Router()

const apiCache = require('./../server/ApiCache')

/* GET api listing. */
router.get('/getForecastWeather/:city', async function(req, res, next) {
  try {
    let response = await apiCache.getInstance().getCachedForecastWeather(req.params, req.app.get('apiAccessor'))
    res.send(response)
  } catch (e) {
    next(e)
  }
})

router.get('/getCurrentWeather/:city', async function(req, res, next) {
  try {
    let response = await apiCache.getInstance().getCachedCurrentWeather(req.params, req.app.get('apiAccessor'))
    res.send(response)
  } catch (e) {
    next(e)
  }
})

router.get('/search/:input', (req, res, next) => {
  let cityNames = Object.keys(apiCache.getInstance().getNamesCache())
  let filteredCities = cityNames.filter((e) => {
    return e.indexOf(req.params.input) >= 0
  })

  res.send(filteredCities)
})

module.exports = router

@@ -176,32 +176,24 @@
 ity', async 
-function
 (req, res, n
@@ -188,32 +188,35 @@
 (req, res, next)
+ =%3E
  %7B%0A  try %7B%0A    l
@@ -431,16 +431,8 @@
 ync 
-function
 (req
@@ -443,16 +443,19 @@
 s, next)
+ =%3E
  %7B%0A  try

Revert "heroku update"