add some features

This commit is contained in:
2026-04-22 21:37:07 +02:00
parent bdd06105dd
commit c10e259ae8
20 changed files with 2101 additions and 1030 deletions
+27
View File
@@ -5,9 +5,36 @@ import { asyncHandler } from '../utils/asyncHandler.js';
const router = Router();
/**
* @openapi
* /api/v1/health:
* get:
* summary: Health check
* description: Returns API and database connection status. Checks MariaDB connectivity.
* tags:
* - Health
* responses:
* 200:
* description: API is healthy
* content:
* application/json:
* schema:
* type: object
* properties:
* status:
* type: string
* example: ok
* service:
* type: string
* example: check-list-poc-api
* database:
* type: string
* example: connected
*/
router.get(
'/',
asyncHandler(async (_req, res) => {
console.log(`PUBLIC: GET /api/v1/health`);
/*
* The health endpoint checks the database on purpose instead of only proving
* that Express can answer HTTP. In this project, the server is not useful if