JSON method should use existing response

pull/20/head
Mike Cao 12 years ago
parent f41d2efa8a
commit 9a115b84ab

@ -399,7 +399,7 @@ class Flight {
* @param mixed $data Data to JSON encode * @param mixed $data Data to JSON encode
*/ */
public static function _json($data) { public static function _json($data) {
self::response(false) self::response()
->status(200) ->status(200)
->header('Content-Type', 'application/json') ->header('Content-Type', 'application/json')
->write(json_encode($data)) ->write(json_encode($data))

Loading…
Cancel
Save