Added create_remark() method

This commit is contained in:
swagg boi 2022-08-22 20:42:41 -04:00
parent ab9b055047
commit 6ccbaf2245

View file

@ -33,4 +33,26 @@ sub remarks_per_page($self, $value = undef) {
$self->{'remarks_per_page'} = $value // $self->{'remarks_per_page'};
}
sub create_remark(
$self,
$thread_id,
$author,
$body,
$hidden = 0,
$flagged = 0
)
{
$self->pg->db
->query(<<~'END_SQL', $thread_id, $author, $body, $hidden, $flagged)
INSERT INTO remarks (
thread_id,
remark_author,
remark_body,
hidden_status,
flagged_status
)
VALUES (?, ?, ?, ?, ?);
END_SQL
}
1;