File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,19 @@ public function handle(Request $request)
44
44
}
45
45
46
46
$ menu = $ this ->boltConfig ->get ('menu ' . $ name , false );
47
-
47
+
48
48
if (! $ menu ) {
49
49
throw new ApiNotFoundException (
50
50
"Menu with name [ $ name] not found. "
51
51
);
52
52
}
53
53
54
- return new ApiResponse ([
54
+ $ response = new ApiResponse ([
55
55
'data ' => $ menu ,
56
56
], $ this ->extensionConfig );
57
+
58
+ $ response ->headers ->set ('Content-Type ' , 'application/json ' );
59
+
60
+ return $ response ;
57
61
}
58
62
}
Original file line number Diff line number Diff line change @@ -51,8 +51,12 @@ public function handle(Request $request)
51
51
);
52
52
}
53
53
54
- return new ApiResponse ([
54
+ $ response = new ApiResponse ([
55
55
'data ' => $ taxonomy ,
56
56
], $ this ->extensionConfig );
57
+
58
+ $ response ->headers ->set ('Content-Type ' , 'application/json ' );
59
+
60
+ return $ response ;
57
61
}
58
62
}
You can’t perform that action at this time.
0 commit comments