Last active
September 22, 2019 16:30
-
-
Save SwiftyAlex/4e57599b178ae9b27283d1481fb9c482 to your computer and use it in GitHub Desktop.
A Route that gets a Todo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// A route that gets a single `Todo`. | |
public struct GetTodoRoute: Route { | |
public typealias RequestType = Empty | |
public typealias ResponseType = Todo | |
public static let method = HTTPMethod.get | |
public static let path = "todos" | |
public static let requiresAuth = false | |
public var requestObject: Empty? | |
public var queryParemeters: [URLQueryItem] = [] | |
public var pathParameters: [String] { | |
get { return [String(todo.id)] } | |
} | |
var todo: Todo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment