소스 검색

fix direct post view

George S. Baugh 4 년 전
부모
커밋
244d5f4a25
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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];