1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2025-07-23 09:09:57 +02:00

fix request bug

This commit is contained in:
lxsang
2018-10-10 14:35:00 +02:00
parent 0ad5eaa138
commit 6098e1b0ee
3 changed files with 8 additions and 8 deletions

View File

@ -1,8 +1,8 @@
if not REQUEST.query.json then
if not REQUEST.json then
fail("unknown request")
end
local rq = (JSON.decodeString(REQUEST.query.json))
local rq = (JSON.decodeString(REQUEST.json))
local to = "xsang.le@gmail.com"
local from = "From: "..rq.email.."\n"
local suject = "Subject: "..rq.subject.."\n"

View File

@ -1,8 +1,8 @@
if not REQUEST.query.json then
if not REQUEST.json then
fail("unknown request")
end
local rq = (JSON.decodeString(REQUEST.query.json))
local rq = (JSON.decodeString(REQUEST.json))
local sample = {name = "toto", email = "toto@mail.fr"}
local db = require("db.model").get("mrsang","subscribers",sample)