mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-11 18:30:30 +00:00
28 lines
447 B
TypeScript
28 lines
447 B
TypeScript
import { Router, Request, Response } from 'express';
|
|
|
|
export default class Ping {
|
|
/**
|
|
* Router constructor.
|
|
*/
|
|
router() {
|
|
const router = Router();
|
|
|
|
router.get(
|
|
'/',
|
|
this.ping,
|
|
);
|
|
return router;
|
|
}
|
|
|
|
/**
|
|
* Handle the ping request.
|
|
* @param {Request} req
|
|
* @param {Response} res
|
|
*/
|
|
async ping(req: Request, res: Response)
|
|
{
|
|
return res.status(200).send({
|
|
server: true,
|
|
});
|
|
}
|
|
} |