浏览代码

Fix RSS by actually providing timestamps to new posts

George S. Baugh 5 年之前
父节点
当前提交
f20add80be
共有 2 个文件被更改,包括 1 次插入0 次删除
  1. 0 0
      data/DUMMY-dist.json
  2. 1 0
      lib/Trog/Data/DUMMY.pm

文件差异内容过多而无法显示
+ 0 - 0
data/DUMMY-dist.json


+ 1 - 0
lib/Trog/Data/DUMMY.pm

@@ -207,6 +207,7 @@ sub add ($self, @posts) {
     my $example_posts = _read();
     foreach my $post (@posts) {
         $post->{id} //= UUID::Tiny::create_uuid_as_string(UUID::Tiny::UUID_V1, UUID::Tiny::UUID_NS_DNS);
+        $post->{created} = time();
         my (undef, $existing_posts) = $self->get( id => $post->{id} );
         if (@$existing_posts) {
             my $existing_post = $existing_posts->[0];

部分文件因为文件数量过多而无法显示