mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-27 07:14:56 +00:00
20 lines
506 B
Lua
20 lines
506 B
Lua
-- Post comment handler
|
|
-- Single function module for comments UI
|
|
|
|
require("comments.types")
|
|
|
|
---@class PostComment
|
|
local M = {}
|
|
|
|
---Handle posting a comment
|
|
---@param form PostForm Form data with comment field
|
|
---@return PostResult Result with success status
|
|
function M.postComment(form)
|
|
if not form.comment or form.comment == "" then
|
|
return { success = false, error = "Comment required" }
|
|
end
|
|
return { success = true, action = "post_comment", content = form.comment }
|
|
end
|
|
|
|
return M
|