2020-07-30 04:18:38 +00:00
|
|
|
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) {
|
2020-07-30 13:17:49 +00:00
|
|
|
return request.route.params
|
2020-07-30 04:18:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
get_redirect(request: Request) {
|
|
|
|
return redirect('/home')
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|