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

26 lines
637 B
TypeScript
Raw Normal View History

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
}
get_redirect(request: Request) {
return redirect('/home')
}
}