MT#9481 API: fix customerbalance link to self

changes/36/336/2
Andreas Granig 11 years ago
parent a668352876
commit b9aa3be4ff

@ -51,7 +51,7 @@ sub hal_from_item {
),
Data::HAL::Link->new(relation => 'collection', href => sprintf("/api/%s/", $self->resource_name)),
Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'),
Data::HAL::Link->new(relation => 'self', href => sprintf("%s%d", $self->dispatch_path, $item->id)),
Data::HAL::Link->new(relation => 'self', href => sprintf("%s%d", $self->dispatch_path, $item->contract->id)),
Data::HAL::Link->new(relation => 'ngcp:customers', href => sprintf("/api/customers/%d", $item->contract->id)),
],
relation => 'ngcp:'.$self->resource_name,

Loading…
Cancel
Save