coderskitchen
12/09/2019, 12:31 PMrouting {
route("/accounts") {
param("name") {
get {
findAccountsByName(...)
}
}
get {
findAllAccounts()
}
}
so that a
GET /accounts?name=me would execute findAccountsByName(...)
and
GET /accounts would execute findAllAccounts()
Apparently it always executes findAllAccounts(). Any idea why?spand
12/09/2019, 12:42 PMoptionalParam
coderskitchen
12/09/2019, 12:45 PMmethod(Get) {
route("/accounts") {
param("name") {
handle {
findAccountsByName(...)
}
}
handle {
findAllAccounts()
}
}
}