ng-apimock-with-presets
Version:
An ng-apimock fork with preset functionality
19 lines • 811 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var http_1 = require("../../http");
var ResetMocksToDefaultsHandler = (function () {
function ResetMocksToDefaultsHandler() {
}
ResetMocksToDefaultsHandler.prototype.handleRequest = function (request, response, next, registry, ngApimockId) {
this.resetToDefaults(registry, ngApimockId);
var selections = this.getSelections(registry, ngApimockId);
response.writeHead(200, http_1.httpHeaders.CONTENT_TYPE_APPLICATION_JSON);
response.end(JSON.stringify({
mocks: registry.mocks,
selections: selections
}));
};
return ResetMocksToDefaultsHandler;
}());
exports.default = ResetMocksToDefaultsHandler;
//# sourceMappingURL=resetMocksToDefaultsHandler.js.map