Merge branch 'refactor' into master

This commit is contained in:
Robin Malley 2020-12-28 04:28:26 +00:00
commit a169c68575
1 changed files with 0 additions and 20 deletions

View File

@ -57,15 +57,6 @@ local function anon_paste(req,ps)
print("Failed to save raw text, but paste still went though")
end
tags.set(rowid,ps.tags)
--[[
for _,tag in pairs(ps.tags) do
print("tag 1:",stmnt_ins_tag:bind(1,rowid))
print("Looking at tag",tag)
print("tag 2:",stmnt_ins_tag:bind(2,tag))
err = util.do_sql(stmnt_ins_tag)
stmnt_ins_tag:reset()
end
]]
local url = util.encode_id(rowid)
local loc = string.format("https://%s/%s",config.domain,url)
http_response_header(req,"Location",loc)
@ -117,15 +108,6 @@ local function author_paste(req,ps)
print("Failed to save raw text, but paste still went through")
end
tags.set(rowid,ps.tags)
--[[
for _,tag in pairs(ps.tags) do
print("tag 1:",stmnt_ins_tag:bind(1,rowid))
print("Looking at tag",tag)
print("tag 2:",stmnt_ins_tag:bind(2,tag))
err = do_sql(stmnt_ins_tag)
stmnt_ins_tag:reset()
end
]]
local url = util.encode_id(rowid)
local loc
if asanon == "anonymous" then
@ -189,6 +171,4 @@ local function paste_post(req)
author_paste(req,ps)
end
end
--assert(ret)
--http_response(req,200,ret)
return paste_post