servty / src /lib /response /SuccessfulBody.ts
ffreemt
Update from redteam repo
f25d8c5
raw
history blame contribute delete
368 Bytes
import _ from 'lodash';
import Body from './Body.ts';
export default class SuccessfulBody extends Body {
constructor(data: any, message?: string) {
super({
code: 0,
message: _.defaultTo(message, "OK"),
data
});
}
static isInstance(value) {
return value instanceof SuccessfulBody;
}
}