blob: 367928661e7cad83a22be6733b682b228e7caa44 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package test.cask
import cask.FormValue
import io.undertow.server.HttpServerExchange
object FormJsonPost extends cask.MainRoutes{
@cask.postJson("/json")
// @db.validateUser()
def jsonEndpoint(x: HttpServerExchange, value1: ujson.Js.Value, value2: Seq[Int]) = {
// (user: db.User) = {
"OK " + value1 + " " + value2
}
@cask.postForm("/form")
def formEndpoint(x: HttpServerExchange, value1: FormValue, value2: Seq[Int]) = {
"OK " + value1 + " " + value2
}
initialize()
}
|