UNPKG

tranxpress

Version:

A smart async wrapper for Express with MongoDB transaction support.

20 lines (19 loc) 513 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SuccessResponse = void 0; class SuccessResponse { constructor(message, data, statusCode = 200) { this.message = message; this.data = data; this.statusCode = statusCode; } toJSON() { return { status: true, message: this.message, data: this.data, statusCode: this.statusCode, }; } } exports.SuccessResponse = SuccessResponse;