comparison src/new_post.js.luan @ 56:7ce54f6d93f2

add change name
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 28 Nov 2022 22:00:43 -0700
parents 9f8ebc757814
children
comparison
equal deleted inserted replaced
55:c57b84f461ae 56:7ce54f6d93f2
30 text = preprocess(text) 30 text = preprocess(text)
31 end 31 end
32 local post = Post.new{ 32 local post = Post.new{
33 root_id = to_number(root_id) or error() 33 root_id = to_number(root_id) or error()
34 content = text 34 content = text
35 author_name = user.name 35 author_id = user.id
36 } 36 }
37 Db.run_in_transaction( function() 37 Db.run_in_transaction( function()
38 post.save() 38 post.save()
39 end ) 39 end )
40 local html = output_of(function() show_post(post,time_now()) end) 40 local html = output_of(function() show_post(post,time_now()) end)