HTTP errors!

This commit is contained in:
garrettmills
2020-07-30 09:30:43 -05:00
parent 194fa476ca
commit f1c4fbdb95
9 changed files with 211 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
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'
import {error, html, http, redirect} from '../../../lib/src/http/response/helpers.ts'
export default class TestController extends Controller {
@@ -9,10 +9,10 @@ export default class TestController extends Controller {
}
get_user_home(request: Request) {
return redirect('/home')
return http(401, 'You should not be here!')
}
create_user_home(request: Request) {
return error('Not implemented!')
return http(401)
}
}