Added create_remark() method
This commit is contained in:
parent
ab9b055047
commit
6ccbaf2245
@ -33,4 +33,26 @@ sub remarks_per_page($self, $value = undef) {
|
|||||||
$self->{'remarks_per_page'} = $value // $self->{'remarks_per_page'};
|
$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;
|
1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user