Spaces:
Running
Running
| import { Controller, Get } from '@nestjs/common'; | |
| import { AppService } from './app.service'; | |
| () | |
| export class AppController { | |
| constructor(private readonly appService: AppService) {} | |
| () | |
| 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', | |
| }; | |
| } | |
| ('health') | |
| getHealth() { | |
| return { | |
| status: 'healthy', | |
| timestamp: new Date().toISOString(), | |
| uptime: process.uptime(), | |
| }; | |
| } | |
| } | |