Parcourir la source

Fix RSS by actually providing timestamps to new posts

George S. Baugh il y a 5 ans
Parent
commit
f20add80be
2 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 0 0
      data/DUMMY-dist.json
  2. 1 0
      lib/Trog/Data/DUMMY.pm

Fichier diff supprimé car celui-ci est trop grand
+ 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];

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff