19 lines
510 B
TypeScript
19 lines
510 B
TypeScript
import Controller from '../../../lib/src/http/Controller.ts'
|
|
import {Request} from '../../../lib/src/http/Request.ts'
|
|
import {error, html, http, redirect} from '../../../lib/src/http/response/helpers.ts'
|
|
|
|
export default class TestController extends Controller {
|
|
|
|
get_home(request: Request) {
|
|
return html('<h1>Hi!</h1>')
|
|
}
|
|
|
|
get_user_home(request: Request) {
|
|
return http(401, 'You should not be here!')
|
|
}
|
|
|
|
create_user_home(request: Request) {
|
|
return http(401)
|
|
}
|
|
}
|