Mercurial Hosting > luan
view examples/blog/src/delete.luan @ 2048:59f3a7f3d10b acme-tiny tip
add check for local_https in renewSsl.sh
| author | Violet7 |
|---|---|
| date | Tue, 11 Nov 2025 01:45:02 -0800 |
| parents | bc40bc9aab3a |
| children |
line wrap: on
line source
local Luan = require "luan:Luan.luan" local error = Luan.error local String = require "luan:String.luan" local to_number = String.to_number or error() local Http = require "luan:http/Http.luan" local Post = require "site:/lib/Post.luan" return function() local post_id = to_number(Http.request.parameters.post) or error() Post.delete_by_id(post_id) Http.response.send_redirect("/") end
