mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 03:56:03 +00:00
ebc65cecd6
Reviewed By: matryoshcow Differential Revision: D4235221 fbshipit-source-id: 6930a106ed02bec1d77a790641c3dcad46c779b9
24 lines
673 B
JavaScript
24 lines
673 B
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
'use strict';
|
|
|
|
const launchEditor = require('../util/launchEditor');
|
|
|
|
module.exports = function({projectRoots}) {
|
|
return function(req, res, next) {
|
|
if (req.url === '/open-stack-frame') {
|
|
const frame = JSON.parse(req.rawBody);
|
|
launchEditor(frame.file, frame.lineNumber, projectRoots);
|
|
res.end('OK');
|
|
} else {
|
|
next();
|
|
}
|
|
};
|
|
};
|