Enhance API routing and health check functionality

- Added ApiRouteTemplate as a base class for defining API routes
- Implemented HealthCheckApi for health check endpoint management
- Introduced IApiRoute interface for consistent route handling
- Updated UserApiRoute to align with new routing structure
- Added HealthCheck class for health status retrieval
- Improved dependency management with new types and interfaces
This commit is contained in:
2025-11-10 22:12:41 -05:00
parent f6d0afb98a
commit ce85dd1ead
22 changed files with 183 additions and 63 deletions

View File

@@ -1,4 +1,4 @@
import {LoggingLevel, type LoggingLevelType} from '../LoggingLevel';
import {type LoggingLevelType} from '../LoggingLevel';
import type ILogMessage from './LogMessage';
export type AppenderOptions = {
@@ -7,7 +7,7 @@ export type AppenderOptions = {
export default class Appender {
private readonly _logRecorderUrl: string = 'https://logserver.techniker.me/api/logs';
// @ts-ignore
// @ts-expect-error browser vs node
private readonly _domain: string = typeof globalThis !== 'undefined' ? (globalThis.location?.hostname ?? '') : '';
private readonly _logMessageQueue: ILogMessage[] = [];
private _pendingPostLogMessagePromise: Promise<Response | undefined> | undefined = undefined;