22 lines
550 B
JavaScript
22 lines
550 B
JavaScript
'use strict';
|
|
|
|
const { authAllowAdmin } = require('../middlewares/validate');
|
|
|
|
/**
|
|
* Health Check Routes
|
|
* Simple monitoring endpoints for partner integration
|
|
*/
|
|
|
|
module.exports = function (app) {
|
|
const router = require('express').Router();
|
|
const healthController = require('../controllers/health');
|
|
|
|
// Basic health check endpoint
|
|
router.get('/', healthController.healthCheck_get);
|
|
|
|
// Partner statistics endpoint
|
|
router.get('/partnerStats', healthController.partnerStats_get);
|
|
|
|
app.use('/api/health', authAllowAdmin(), router);
|
|
};
|