Explorar o código

fix direct post view

George S. Baugh %!s(int64=4) %!d(string=hai) anos
pai
achega
244d5f4a25
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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];