Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 9x 9x 3x 12x 9x | import Endpoint from 'endpoint';
import HttpError from 'http/error';
import JsonObject from 'http/type/json-object';
import ContentType from 'http/enum/content-type';
abstract class JsonEndpoint<Input> extends Endpoint<Input, JsonObject> {
protected serializeError(error: HttpError): JsonObject {
return {
message: error.message
};
}
protected getResponseContentType(): ContentType {
return ContentType.JSON;
}
}
export default JsonEndpoint;
|