Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created August 1, 2018 19:12
Show Gist options
  • Save vialyx/d8e38e151bd291d75bd211b82187bbd0 to your computer and use it in GitHub Desktop.
Save vialyx/d8e38e151bd291d75bd211b82187bbd0 to your computer and use it in GitHub Desktop.
import Vapor
/// Register your application's routes here.
public func routes(_ router: Router) throws {
router.get("departure") { request in
return """
[
{
"company_name": "Belavia",
"departure_time": "05:00",
"flight": "A03GH",
"direction": "Milano",
"reseption": "19-20",
"gate": "B8",
"status": "departed"
},
{
"company_name": "Belavia",
"departure_time": "05:00",
"flight": "A03GH",
"direction": "Milano",
"reseption": "19-20",
"gate": "B8",
"status": "departed"
},
{
"company_name": "Belavia",
"departure_time": "05:00",
"flight": "A03GH",
"direction": "Milano",
"reseption": "19-20",
"gate": "B8",
"status": "departed"
},
{
"company_name": "Belavia",
"departure_time": "05:00",
"flight": "A03GH",
"direction": "Milano",
"reseption": "19-20",
"gate": "B8",
"status": "departed"
}
]
"""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment