UNPKG

603 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const Response_1 = require("./Response");
4class SuccessfulResponse extends Response_1.Response {
5 static create(statusCode, data, meta) {
6 return new this({ statusCode, data, meta });
7 }
8 static ok(data, meta) {
9 return this.create(data, meta);
10 }
11 // @#todo exit wirth status
12 static error(data, meta) {
13 return this.create(data, meta);
14 }
15 apply() {
16 this.setBody(this.data);
17 }
18}
19exports.SuccessfulResponse = SuccessfulResponse;
20//# sourceMappingURL=CliResponse.js.map
\No newline at end of file