daton/app/http/controllers/Test.controller.ts

19 lines
510 B
TypeScript
Raw Normal View History

import Controller from '../../../lib/src/http/Controller.ts'
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'
export default class TestController extends Controller {
get_home(request: Request) {
return html('<h1>Hi!</h1>')
}
get_user_home(request: Request) {
2020-07-30 14:30:43 +00:00
return http(401, 'You should not be here!')
}
create_user_home(request: Request) {
2020-07-30 14:30:43 +00:00
return http(401)
}
}