From cea83b0ef77cab36e718cd918a1e30296a616a77 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Tue, 23 Aug 2022 20:24:58 -0400 Subject: [PATCH] Lil cleanup --- lib/PostText/Model/Remark.pm | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/PostText/Model/Remark.pm b/lib/PostText/Model/Remark.pm index bb84a82..0731d88 100644 --- a/lib/PostText/Model/Remark.pm +++ b/lib/PostText/Model/Remark.pm @@ -37,18 +37,11 @@ sub remarks_per_page($self, $value = undef) { $self->{'remarks_per_page'} = $value // $self->{'remarks_per_page'} } -# Probably can clean this up too -sub create_remark( - $self, - $thread_id, - $author, - $body, - $hidden = 0, - $flagged = 0 - ) +sub create_remark($self, $thread_id, $author, $body, $hidden = 0, $flagged = 0) { - $self->pg->db - ->query(<<~'END_SQL', $thread_id, $author, $body, $hidden, $flagged) + my @data = ($thread_id, $author, $body, $hidden, $flagged); + + $self->pg->db->query(<<~'END_SQL', @data); INSERT INTO remarks ( thread_id, remark_author,