1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const Response_1 = require("./Response");
|
4 | class 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 |
|
12 | static error(data, meta) {
|
13 | return this.create(data, meta);
|
14 | }
|
15 | apply() {
|
16 | this.setBody(this.data);
|
17 | }
|
18 | }
|
19 | exports.SuccessfulResponse = SuccessfulResponse;
|
20 |
|
\ | No newline at end of file |