2020-07-30 03:01:20 +00:00
|
|
|
import Controller from '../../../lib/src/http/Controller.ts'
|
2020-07-30 03:55:17 +00:00
|
|
|
import {Request} from '../../../lib/src/http/Request.ts'
|
2020-07-30 14:30:43 +00:00
|
|
|
import {error, html, http, redirect} from '../../../lib/src/http/response/helpers.ts'
|
2020-07-06 14:53:03 +00:00
|
|
|
|
|
|
|
export default class TestController extends Controller {
|
|
|
|
|
2020-07-30 03:55:17 +00:00
|
|
|
get_home(request: Request) {
|
|
|
|
return html('<h1>Hi!</h1>')
|
2020-07-30 03:01:20 +00:00
|
|
|
}
|
2020-07-30 03:55:17 +00:00
|
|
|
|
|
|
|
get_user_home(request: Request) {
|
2020-07-30 14:30:43 +00:00
|
|
|
return http(401, 'You should not be here!')
|
2020-07-30 03:01:20 +00:00
|
|
|
}
|
|
|
|
|
2020-07-30 03:55:17 +00:00
|
|
|
create_user_home(request: Request) {
|
2020-07-30 14:30:43 +00:00
|
|
|
return http(401)
|
2020-07-30 03:55:17 +00:00
|
|
|
}
|
2020-07-06 14:53:03 +00:00
|
|
|
}
|