md-toy-blog
Version:
Very simple Markdown blog: serves your md as html without fancy databases. You will only spend time writing the actual data.
19 lines (17 loc) • 530 B
text/typescript
export default class NotFoundController implements ControllerInterface {
constructor(protected config?: NotFoundControllerCtorConfig) {}
handleError(err: Error) {
return {
code: 501,
headers: {'content-type': 'text/plain; charset=utf-8'},
body: 'Internal server error, could not retrieve blog post',
};
};
async action(params: {}): Promise<ResponseInterface> {
return {
code: 404,
headers: {'content-type': 'text/plain; charset=utf-8'},
body: '404 Not found',
};
}
}