daton/app/http/controllers/Api.controller.ts
2020-07-30 08:17:49 -05:00

26 lines
637 B
TypeScript

import BaseApiController from "../../../lib/src/http/ApiController.ts";
import {Request} from "../../../lib/src/http/Request.ts";
import {redirect} from "../../../lib/src/http/response/helpers.ts";
export default class ApiController extends BaseApiController {
get_good(request: Request) {
return {
session_key: request.session.get_key(),
}
}
get_arr(request: Request) {
return ['alpha', 'bravo', 'charlie', 'delta', 'echo']
}
get_msg(request: Request) {
return request.route.params
}
get_redirect(request: Request) {
return redirect('/home')
}
}