Request handlers & error response factory!
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
import Controller from "../../../lib/src/http/Controller.ts";
|
||||
import Controller from '../../../lib/src/http/Controller.ts'
|
||||
|
||||
export default class TestController extends Controller {
|
||||
|
||||
get_home(req: any) {
|
||||
req.response.body = 'Hello!'
|
||||
}
|
||||
get_user_home(req: any) {
|
||||
throw new Error('Hello, world!')
|
||||
}
|
||||
create_user_home(req: any) {}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user