[Bps-public-commit] rt-extension-rest2 branch, master, updated. a87ba6092f1e246ae6d9c23b0cd0aaa93bda389d

Shawn Moore shawn at bestpractical.com
Wed Jul 19 13:13:44 EDT 2017


The branch, master has been updated
       via  a87ba6092f1e246ae6d9c23b0cd0aaa93bda389d (commit)
      from  48dd7bbc67286e5a8e248b3e26d3a741dfeb961f (commit)

Summary of changes:
 lib/RT/Extension/REST2/Resource/Message.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit a87ba6092f1e246ae6d9c23b0cd0aaa93bda389d
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Jul 19 17:12:05 2017 +0000

    base_path not required in create_path
    
    According to Web::Machine's docs:
    
      create_path
        ...
        The path returned should be a valid URI part following the
        dispatcher prefix.
    
    See previous commit for why this suddenly broke.

diff --git a/lib/RT/Extension/REST2/Resource/Message.pm b/lib/RT/Extension/REST2/Resource/Message.pm
index 047d7ce..3a6cfa4 100644
--- a/lib/RT/Extension/REST2/Resource/Message.pm
+++ b/lib/RT/Extension/REST2/Resource/Message.pm
@@ -101,7 +101,7 @@ sub add_message {
 sub create_path {
     my $self = shift;
     my $id = $self->created_transaction->Id;
-    return RT::Extension::REST2->base_path . "/transaction/$id";
+    return "/transaction/$id";
 }
 
 __PACKAGE__->meta->make_immutable;

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list