"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResponseBuilder = void 0;
class ResponseBuilder {
    static error(result, statusCode) {
        return ResponseBuilder._returnAs({ error: result }, statusCode);
    }
    static ok(result) {
        return ResponseBuilder._returnAs(result, 200);
    }
    static _returnAs(result, statusCode) {
        return {
            body: JSON.stringify(result),
            statusCode,
            headers: {
                'Content-Type': 'application/json',
            },
        };
    }
}
exports.ResponseBuilder = ResponseBuilder;
//# sourceMappingURL=ResponseBuilder.js.map