Prechádzať zdrojové kódy

fix direct post view

George S. Baugh 4 rokov pred
rodič
commit
244d5f4a25
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      lib/Trog/DataModule.pm

+ 2 - 1
lib/Trog/DataModule.pm

@@ -236,7 +236,8 @@ sub add ($self, @posts) {
         $post->{id} //= UUID::Tiny::create_uuid_as_string(UUID::Tiny::UUID_V1, UUID::Tiny::UUID_NS_DNS);
         $post->{local_href} //= "/posts/$post->{id}";
         $post->{method}     //= 'GET';
-        $post->{created} = time();
+        $post->{callback}   //= 'Trog::Routes::HTML::posts';
+        $post->{created}    = time();
         my @existing_posts = $self->get( id => $post->{id} );
         if (@existing_posts) {
             my $existing_post = $existing_posts[0];