New TODO
This commit is contained in:
parent
cf73d084b5
commit
3849ceffae
|
@ -40,3 +40,7 @@ Mojolicious blockchain technologies powered by AI.
|
|||
Result: PASS
|
||||
|
||||
Add the `-v` option for more verbose output
|
||||
|
||||
## TODOs
|
||||
|
||||
1. Input validation
|
||||
|
|
|
@ -63,7 +63,7 @@ any [qw{GET POST}], '/sign' => sub ($c) {
|
|||
my $message = $c->param('message');
|
||||
my $answer = $c->param('answer');
|
||||
|
||||
$c->message->send_post($name, $message) if $answer;
|
||||
$c->message->create_post($name, $message) if $answer;
|
||||
$c->redirect_to('index');
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -21,7 +21,7 @@ sub get_posts($self) {
|
|||
ORDER BY date DESC;')->arrays()
|
||||
}
|
||||
|
||||
sub send_post($self, $name, $msg) {
|
||||
sub create_post($self, $name, $msg) {
|
||||
$self->pg->db->query(
|
||||
'INSERT INTO messages (date, name, msg)
|
||||
VALUES (NOW(), ?, ?);', $name, $msg
|
||||
|
|
Loading…
Reference in a new issue