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

19 lines
501 B
TypeScript

import Controller from '../../../lib/src/http/Controller.ts'
import {Request} from '../../../lib/src/http/Request.ts'
import {error, html, 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 redirect('/home')
}
create_user_home(request: Request) {
return error('Not implemented!')
}
}