m-decode / src /app.controller.ts
GodfreyOwino's picture
adding direct service
eacfb4b
raw
history blame contribute delete
715 Bytes
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@Get()
getInfo() {
return {
service: 'M-Pesa Hash Decoder Wrapper API',
status: 'active',
version: '1.0.0',
endpoints: {
decode: '/decode/{hash}',
info: '/decode/',
health: '/health',
},
description:
'NestJS wrapper for decodehash.com free M-Pesa hash decoding service',
};
}
@Get('health')
getHealth() {
return {
status: 'healthy',
timestamp: new Date().toISOString(),
uptime: process.uptime(),
};
}
}