routes.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. const kyiv = require('./../city/Kyiv.json')
  2. const Kharkiv = require('./../city/Kharkiv.json')
  3. const Donetsk = require('./../city/Donetsk.json')
  4. const Odessa = require('./../city/Odessa.json')
  5. const Poltava = require('./../city/Poltava.json')
  6. const Dnipro = require('./../city/Dnipro.json')
  7. const Zaporizhzhya = require('./../city/Zaporizhzhya.json')
  8. const Lviv = require('./../city/Lviv.json')
  9. const KryvyiRih = require('./../city/Kryvyi Rih.json')
  10. const Mykolayiv = require('./../city/Mykolayiv.json')
  11. const Mariupol = require('./../city/Mariupol.json')
  12. const Luhansk = require('./../city/Luhansk.json')
  13. const Sebastopol = require('./../city/Sevastopol.json')
  14. // Router
  15. const router = app => {
  16. app.get('/Kyiv', (request, response) => {
  17. response.send(kyiv);
  18. });
  19. app.get('/Kharkiv', (request, response) => {
  20. response.send(Kharkiv);
  21. });
  22. app.get('/Donetsk', (request, response) => {
  23. response.send(Donetsk);
  24. });
  25. app.get('/Odessa', (request, response) => {
  26. response.send(Odessa);
  27. });
  28. app.get('/Poltava', (request, response) => {
  29. response.send(Poltava);
  30. });
  31. app.get('/Dnipro', (request, response) => {
  32. response.send(Dnipro);
  33. });
  34. app.get('/Zaporizhzhya', (request, response) => {
  35. response.send(Zaporizhzhya);
  36. });
  37. app.get('/Lviv', (request, response) => {
  38. response.send(Lviv);
  39. });
  40. app.get('/Kryvyi%20Rih', (request, response) => {
  41. response.send(KryvyiRih);
  42. });
  43. app.get('/Mykolayiv', (request, response) => {
  44. response.send(Mykolayiv);
  45. });
  46. app.get('/Mariupol', (request, response) => {
  47. response.send(Mariupol);
  48. });
  49. app.get('/Luhansk', (request, response) => {
  50. response.send(Luhansk);
  51. });
  52. app.get('/Sebastopol', (request, response) => {
  53. response.send(Sebastopol);
  54. });
  55. }
  56. // Export the router
  57. module.exports = router;