Skip to content

Commit 2bea853

Browse files
committed
Added X-WING-SKIP-RESULT-WRAPPER header check in Wing::Rest.
1 parent d240caa commit 2bea853

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ This file tracks the changes to Wing over time. Especially
44
with respect to new features and compatibility changes.
55
==========================================================
66

7+
2022-12-27
8+
* Added X-WING-SKIP-RESULT-WRAPPER header check in Wing::Rest.
9+
710
2022-12-16
811
* Added generate_options_by_name_where option to Wing::Role::Result::Parent.
912
* Added a switch to have new comment box at the top instead of the bottom.

lib/Wing/Rest.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ hook before => sub {
258258
hook before_serializer => sub {
259259
my $response = shift;
260260
my $content = $response->{content};
261-
$response->{content} = { result => $content, };
261+
unless ($response->header('X-WING-SKIP-RESULT-WRAPPER')) {
262+
$response->{content} = { result => $content };
263+
}
262264
return $response;
263265
};
264266

0 commit comments

Comments
 (0)