mirror of
https://github.com/lxsang/antd-lua-plugin
synced 2024-12-28 18:38:20 +01:00
15 lines
257 B
Lua
15 lines
257 B
Lua
auth_or_die("User unauthorized. Please login")
|
|
|
|
local vfs = require("fs.vfs")
|
|
local rq = (JSON.decodeString(REQUEST.query.json))
|
|
|
|
if rq ~= nil then
|
|
local r,e = vfs.delete(rq.path)
|
|
if r then
|
|
result(r)
|
|
else
|
|
fail(e)
|
|
end
|
|
else
|
|
fail("Uknown request")
|
|
end |