Pārlūkot izejas kodu

Force GETS on posts

George Baugh 2 gadi atpakaļ
vecāks
revīzija
8edcbf26f1
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      lib/Trog/Routes/HTML.pm

+ 3 - 0
lib/Trog/Routes/HTML.pm

@@ -755,6 +755,9 @@ sub post_save ($query) {
     # Ensure there are no null tags
     @{ $query->{tags} } = grep { defined $_ } @{ $query->{tags} };
 
+    # Posts will always be GET
+    $query->{method} = 'GET';
+
     $data->add($query) and die "Could not add post";
     return see_also($to);
 }