crystal-gauntlet/src/template_endpoints/account_management.cr

15 lines
563 B
Crystal
Raw Normal View History

2023-01-05 17:53:12 +01:00
require "uri"
require "compress/gzip"
include CrystalGauntlet
CrystalGauntlet.template_endpoints["/#{config_get("general.append_path").as(String | Nil) || ""}accounts/accountManagement.php"] = ->(context : HTTP::Server::Context) {
context.response.headers.add("Location", "/accounts/")
context.response.status = HTTP::Status::MOVED_PERMANENTLY
}
CrystalGauntlet.template_endpoints["/accounts"] = ->(context : HTTP::Server::Context) {
context.response.content_type = "text/html"
ECR.embed("./public/template/account_management.ecr", context.response)
}